From e0e9b64db6ee862f6189dd9c5beede0f8d331e09 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 17 Feb 2023 19:48:27 +1000 Subject: [PATCH] GS/HW: Fix region textures being used when redundant --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index d4c7d81d8c..f27f14004c 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -279,7 +279,7 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con { // Another Lupin case here, it uses region clamp with UV (not ST), puts a clamp region further // into the texture, but a smaller TW/TH. Catch this by looking for a clamp range above TW. - const u32 rw = CLAMP.MAXU - CLAMP.MAXU + 1; + const u32 rw = CLAMP.MAXU - CLAMP.MINU + 1; if (rw < (1u << TEX0.TW) || CLAMP.MAXU >= (1u << TEX0.TW)) { region.SetX(CLAMP.MINU, CLAMP.MAXU + 1);