From 7428f977c2a281a9c28fdbd91cb3b189cdda81fc Mon Sep 17 00:00:00 2001 From: yuzubot Date: Fri, 23 Feb 2024 20:33:46 +0000 Subject: [PATCH] Merge yuzu-emu#13122 --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 74f9f099e..ead4a0430 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -125,9 +125,11 @@ VkRect2D GetScissorState(const Maxwell& regs, size_t index, u32 up_scale = 1, u3 return value < 0 ? std::min(converted_value - acumm, -1) : std::max(converted_value + acumm, 1); }; + const bool lower_left = regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft; + const s32 y_adj = lower_left ? scale_up(regs.surface_clip.height - (src.max_y - src.min_y)) : 0; if (src.enable) { scissor.offset.x = scale_up(static_cast(src.min_x)); - scissor.offset.y = scale_up(static_cast(src.min_y)); + scissor.offset.y = scale_up(static_cast(src.min_y)) + y_adj; scissor.extent.width = scale_up(src.max_x - src.min_x); scissor.extent.height = scale_up(src.max_y - src.min_y); } else {