From eee67a30da77f45f2c19b23db4aff6deb78b966f Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 3 Jun 2025 18:54:27 +1000 Subject: [PATCH] GPU/HW: Fix off-by-one in sprite UV rect calculation CheckForTexPageOverlap() makes it exclusive already. Fixes replacements for FF8 title screen not applying in the third texture page, because it thought it was sampling from an unwritten area of VRAM. --- src/core/gpu_hw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index be75c9824..7248d9924 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -2782,7 +2782,7 @@ void GPU_HW::DrawSprite(const GPUBackendDrawRectangleCommand* cmd) if (cmd->texture_enable && ShouldCheckForTexPageOverlap()) { CheckForTexPageOverlap(cmd, GSVector4i(static_cast(tex_left), static_cast(tex_top), - static_cast(tex_right), static_cast(tex_bottom))); + static_cast(tex_right) - 1, static_cast(tex_bottom) - 1)); } const u32 base_vertex = m_batch_vertex_count;