diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2022-08-24 01:37:40 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2022-08-24 01:38:34 +0200 |
commit | 0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f (patch) | |
tree | 81703a4fec195a660507eadb8d15ee0410ef493b /src | |
parent | Merge pull request #8799 from liamwhite/where-did-the-padding-go (diff) | |
download | yuzu-0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f.tar yuzu-0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f.tar.gz yuzu-0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f.tar.bz2 yuzu-0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f.tar.lz yuzu-0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f.tar.xz yuzu-0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f.tar.zst yuzu-0c8aeb09d2cdbfaeea84a61e3e904543ae928a4f.zip |
Diffstat (limited to 'src')
-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, |