Skip to content

Commit

Permalink
GS/HW: Ensure mipmaps aren't generated on hash cache textures
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jun 24, 2024
1 parent f6a7dc5 commit 57d2254
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pcsx2/GS/Renderers/HW/GSTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8, u8> mip_alpha_minmax;
Expand All @@ -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
Expand Down

0 comments on commit 57d2254

Please sign in to comment.