From b2e129eaa5c97f216dcf02e2d853ca809ce392b7 Mon Sep 17 00:00:00 2001 From: liamwhite Date: Tue, 27 Feb 2024 09:40:33 -0500 Subject: vk_rasterizer: flip scissor y on lower left origin mode (#13122) --- src/video_core/engines/draw_manager.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/video_core/engines/draw_manager.cpp') 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() { const bool lower_left{regs.window_origin.mode != Maxwell3D::Regs::WindowOrigin::Mode::UpperLeft}; if (lower_left) { - draw_texture_state.dst_y0 -= dst_height; + draw_texture_state.dst_y0 = + static_cast(regs.surface_clip.height) - draw_texture_state.dst_y0; } - draw_texture_state.dst_x1 = - draw_texture_state.dst_x0 + - static_cast(Settings::values.resolution_info.ScaleUp(static_cast(dst_width))); - draw_texture_state.dst_y1 = - draw_texture_state.dst_y0 + - static_cast(Settings::values.resolution_info.ScaleUp(static_cast(dst_height))); + draw_texture_state.dst_x1 = draw_texture_state.dst_x0 + dst_width; + draw_texture_state.dst_y1 = draw_texture_state.dst_y0 + dst_height; draw_texture_state.src_x0 = static_cast(regs.draw_texture.src_x0) / 4096.f; draw_texture_state.src_y0 = static_cast(regs.draw_texture.src_y0) / 4096.f; draw_texture_state.src_x1 = -- cgit v1.2.3