diff options
author | bunnei <bunneidev@gmail.com> | 2022-08-28 11:46:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-28 11:46:57 +0200 |
commit | c881a67dbaa3efa962e60e3e60dd59371d15b6bb (patch) | |
tree | 8eed32aad56abab0cf3bdf459342a7d3a5194bd1 /src/video_core/renderer_vulkan | |
parent | Merge pull request #8566 from german77/galaxy (diff) | |
parent | video_core: vulkan: rasterizer: Workaround on viewport swizzle on AMD (diff) | |
download | yuzu-c881a67dbaa3efa962e60e3e60dd59371d15b6bb.tar yuzu-c881a67dbaa3efa962e60e3e60dd59371d15b6bb.tar.gz yuzu-c881a67dbaa3efa962e60e3e60dd59371d15b6bb.tar.bz2 yuzu-c881a67dbaa3efa962e60e3e60dd59371d15b6bb.tar.lz yuzu-c881a67dbaa3efa962e60e3e60dd59371d15b6bb.tar.xz yuzu-c881a67dbaa3efa962e60e3e60dd59371d15b6bb.tar.zst yuzu-c881a67dbaa3efa962e60e3e60dd59371d15b6bb.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 16e46d3e5..7e40c2df1 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -69,10 +69,17 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in const float width = conv(src.scale_x * 2.0f); float y = conv(src.translate_y - src.scale_y); float height = conv(src.scale_y * 2.0f); - if (regs.screen_y_control.y_negate) { + bool y_negate = regs.screen_y_control.y_negate; + + if (!device.IsNvViewportSwizzleSupported()) { + y_negate = y_negate != (src.swizzle.y == Maxwell::ViewportSwizzle::NegativeY); + } + + if (y_negate) { y += height; height = -height; } + const float reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1.0f : 0.0f; VkViewport viewport{ .x = x, |