summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar liamwhite2024-02-27 09:40:33 -0500
committerGravatar GitHub2024-02-27 15:40:33 +0100
commitb2e129eaa5c97f216dcf02e2d853ca809ce392b7 (patch)
tree00008f3292759b20e529514b067bc798ae19b21d /src/video_core/engines
parentbuffer_cache: avoid overflow in usage tracker (#13166) (diff)
downloadyuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.tar.gz
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.tar.xz
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.zip
vk_rasterizer: flip scissor y on lower left origin mode (#13122)
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/draw_manager.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/video_core/engines/draw_manager.cpp b/src/video_core/engines/draw_manager.cpp
index d77ff455b..971025cb5 100644
--- a/src/video_core/engines/draw_manager.cpp
+++ b/src/video_core/engines/draw_manager.cpp
@@ -216,14 +216,11 @@ void DrawManager::DrawTexture() {
216 const bool lower_left{regs.window_origin.mode != 216 const bool lower_left{regs.window_origin.mode !=
217 Maxwell3D::Regs::WindowOrigin::Mode::UpperLeft}; 217 Maxwell3D::Regs::WindowOrigin::Mode::UpperLeft};
218 if (lower_left) { 218 if (lower_left) {
219 draw_texture_state.dst_y0 -= dst_height; 219 draw_texture_state.dst_y0 =
220 static_cast<f32>(regs.surface_clip.height) - draw_texture_state.dst_y0;
220 } 221 }
221 draw_texture_state.dst_x1 = 222 draw_texture_state.dst_x1 = draw_texture_state.dst_x0 + dst_width;
222 draw_texture_state.dst_x0 + 223 draw_texture_state.dst_y1 = draw_texture_state.dst_y0 + dst_height;
223 static_cast<f32>(Settings::values.resolution_info.ScaleUp(static_cast<u32>(dst_width)));
224 draw_texture_state.dst_y1 =
225 draw_texture_state.dst_y0 +
226 static_cast<f32>(Settings::values.resolution_info.ScaleUp(static_cast<u32>(dst_height)));
227 draw_texture_state.src_x0 = static_cast<float>(regs.draw_texture.src_x0) / 4096.f; 224 draw_texture_state.src_x0 = static_cast<float>(regs.draw_texture.src_x0) / 4096.f;
228 draw_texture_state.src_y0 = static_cast<float>(regs.draw_texture.src_y0) / 4096.f; 225 draw_texture_state.src_y0 = static_cast<float>(regs.draw_texture.src_y0) / 4096.f;
229 draw_texture_state.src_x1 = 226 draw_texture_state.src_x1 =