From 5218ac694492d7d80b3bd0cea5d900c5ab13f1be Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 14 Dec 2023 18:45:04 +1000 Subject: [PATCH] GPU/HW: Fix incorrect mask in VRAM offset calc --- src/core/gpu_hw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 818c2839f..06e8af704 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -2046,8 +2046,8 @@ ALWAYS_INLINE_RELEASE void GPU_HW::CheckForTexPageOverlap(u32 texpage, u32 min_u const u32 xoffs = (texpage & 0xFu) * 64u; const u32 yoffs = ((texpage >> 4) & 1u) * 256u; - const u32 xshift = uv_shifts_adds[(texpage >> 7) & 2][0]; - const u32 xadd = uv_shifts_adds[(texpage >> 7) & 2][1]; + const u32 xshift = uv_shifts_adds[(texpage >> 7) & 3][0]; + const u32 xadd = uv_shifts_adds[(texpage >> 7) & 3][1]; const u32 vram_min_u = (((min_u & m_draw_mode.texture_window.and_x) | m_draw_mode.texture_window.or_x) >> xshift) + xoffs;