mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 08:20:30 +02:00
Merge pull request #22347 from ygordreyer/fix/umineko-texture-hash
Fix stale glyphs in swizzled CLUT4 atlases
This commit is contained in:
1 file changed
+6
-3
@@ -396,12 +396,15 @@ SamplerCacheKey GetFramebufferSamplingParams(const GEState &gstate, u16 bufferWi
|
||||
|
||||
static u32 ComputeTextureHash(TextureReplacer &replacer, u32 addr, int bufw, int w, int h, bool swizzled, const TexCacheEntry *entry) {
|
||||
const GETextureFormat format = entry->format;
|
||||
// Swizzled CLUT4 glyph atlases can fill below the visible UV range while remaining
|
||||
// 512 pixels tall. Hashing only maxSeenV rows misses those updates (#21980).
|
||||
const u16 hashMaxSeenV = h == 512 && swizzled && format == GE_TFMT_CLUT4 ? 512 : entry->maxSeenV;
|
||||
if (replacer.Enabled()) {
|
||||
return replacer.ComputeHash(addr, bufw, w, h, swizzled, format, entry->maxSeenV);
|
||||
return replacer.ComputeHash(addr, bufw, w, h, swizzled, format, hashMaxSeenV);
|
||||
}
|
||||
|
||||
if (h == 512 && entry->maxSeenV < 512 && entry->maxSeenV != 0) {
|
||||
h = (int)entry->maxSeenV;
|
||||
if (h == 512 && hashMaxSeenV < 512 && hashMaxSeenV != 0) {
|
||||
h = (int)hashMaxSeenV;
|
||||
}
|
||||
|
||||
u32 sizeInRAM;
|
||||
|
||||
Reference in new issue
Block a user