From 57d225437e23977f43dd2b6ca06e8a7599a1971d Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 23 Jun 2024 11:26:43 +1000 Subject: [PATCH] GS/HW: Ensure mipmaps aren't generated on hash cache textures --- pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index fc96e3bf526ff..3646ef1fc925f 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -5366,8 +5366,7 @@ GSTextureCache::HashCacheEntry* GSTextureCache::LookupHashCache(const GIFRegTEX0 if (lod) { const int basemip = lod->x; - const int nmips = lod->y - lod->x + 1; - for (int mip = 1; mip < nmips; mip++) + for (int mip = 1; mip < tlevels; mip++) { const GIFRegTEX0 MIP_TEX0{g_gs_renderer->GetTex0Layer(basemip + mip)}; std::pair mip_alpha_minmax; @@ -5379,6 +5378,8 @@ GSTextureCache::HashCacheEntry* GSTextureCache::LookupHashCache(const GIFRegTEX0 alpha_minmax.second = std::max(alpha_minmax.second, mip_alpha_minmax.second); } } + + tex->ClearMipmapGenerationFlag(); } // remove the palette hash when using paltex/indexed