mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
TextureCache: Use XXH3 instead of the quick hash for texture data
With xxhash 0.8.4, XXH3 is faster than StableQuickTexHash on ARM64 (about 37 vs 24 GB/s on a Snapdragon X), and its scalar path, which RISC-V builds get, is about as fast as the quick hash's. It doesn't collide the way the quick hash does (#8249). Texture replacement still uses its own hash setting, so texture packs are unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
21ee60a8ab
commit
7de7b2d76b
1 file changed
+3
-2
@@ -431,8 +431,9 @@ static u32 ComputeTextureHash(TextureReplacer &replacer, u32 addr, int bufw, int
|
||||
if (Memory::IsValidRange(addr, sizeInRAM)) {
|
||||
gpuStats.perFrame.numTextureDataBytesHashed += sizeInRAM;
|
||||
|
||||
// return XXH64(checkp, sizeInRAM, 0xBACD7814);
|
||||
return StableQuickTexHash(checkp, sizeInRAM);
|
||||
// XXH3 is faster than StableQuickTexHash on ARM64 and doesn't collide the way it did (#8249).
|
||||
// Texture replacement keeps its own hash setting above, so this doesn't affect texture packs.
|
||||
return (u32)XXH3_64bits(checkp, sizeInRAM);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user