summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-27 15:40:33 +0100
committerGitHub <noreply@github.com>2024-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
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.tar.gz
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.tar.bz2
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.tar.lz
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.tar.xz
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.tar.zst
yuzu-b2e129eaa5c97f216dcf02e2d853ca809ce392b7.zip
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() {
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<f32>(regs.surface_clip.height) - draw_texture_state.dst_y0;
}
- draw_texture_state.dst_x1 =
- draw_texture_state.dst_x0 +
- static_cast<f32>(Settings::values.resolution_info.ScaleUp(static_cast<u32>(dst_width)));
- draw_texture_state.dst_y1 =
- draw_texture_state.dst_y0 +
- static_cast<f32>(Settings::values.resolution_info.ScaleUp(static_cast<u32>(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<float>(regs.draw_texture.src_x0) / 4096.f;
draw_texture_state.src_y0 = static_cast<float>(regs.draw_texture.src_y0) / 4096.f;
draw_texture_state.src_x1 =