From fbac3ebad161144864cc7502b0ef0c5f2c11bf9a Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 7 Jul 2022 20:21:25 +1000 Subject: [PATCH] GS/TextureCache: Fix incorrect hashing of L/H/small textures Fixes text getting garbled in Valkyrie Profile 2 with preloading on. --- 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 82687e9c89..f05f244d17 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -2966,7 +2966,7 @@ static void HashTextureLevel(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Blo if (tw < bs.x || th < bs.y || psm.fmsk != 0xFFFFFFFFu) { // Expand texture indices. Align to 32 bytes for AVX2. - const u32 pitch = Common::AlignUpPow2(static_cast(block_rect.w), 32); + const u32 pitch = Common::AlignUpPow2(static_cast(block_rect.z), 32); const u32 row_size = static_cast(tw); const GSLocalMemory::readTexture rtx = psm.rtxP;