diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 3f9a73bb56..7948104608 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -9459,6 +9459,31 @@ GSTextureCache::HashCacheKey GSTextureCache::HashCacheKey::Create(const GIFRegTE ret.TEX0Hash = FinishBlockHash(hash_st); + // ★ CROSS-VERSION PROBE (diagnostic builds only). + // + // Two builds ask for completely disjoint TEX0 hashes for the same on-screen font: nine values + // on 2.6.6, eight now, no overlap, same palette hash, same 32x32 PSMT4. Every hashing function + // involved is byte-identical between them, so the DATA being hashed differs -- and the key + // records only the region's width and height, never where it starts or which address it came + // from. Print the things the key throws away, so the two logs can be diffed directly instead + // of guessed at. + if (psm.pal != 0) // any paletted texture; the cap below keeps the volume sane + { + static u32 probes = 0; + if (probes < 12) + { + probes++; + Console.WriteLnFmt("TCPROBE tex0hash={:016x} clut={:016x} TBP0={:05x} TBW={} PSM={} TW={} TH={} " + "region=({},{})-({},{}) lod={} first={:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}", + ret.TEX0Hash, ret.CLUTHash, static_cast(TEX0.TBP0), static_cast(TEX0.TBW), + static_cast(TEX0.PSM), static_cast(TEX0.TW), static_cast(TEX0.TH), + region.GetMinX(), region.GetMinY(), region.GetMaxX(), region.GetMaxY(), + lod ? 1 : 0, + s_unswizzle_buffer[0], s_unswizzle_buffer[1], s_unswizzle_buffer[2], s_unswizzle_buffer[3], + s_unswizzle_buffer[4], s_unswizzle_buffer[5], s_unswizzle_buffer[6], s_unswizzle_buffer[7]); + } + } + return ret; }