GS: optimize xxHash usage in palette hashing.

This commit is contained in:
iMineLink 2022-01-16 12:28:08 +01:00 committed by refractionpcsx2
parent 364199916f
commit 8db0b52821
1 changed files with 4 additions and 1 deletions

View File

@ -2510,7 +2510,10 @@ void GSTextureCache::Palette::InitializeTexture()
u64 GSTextureCache::PaletteKeyHash::operator()(const PaletteKey& key) const
{
return XXH3_64bits(key.clut, sizeof(key.clut[0]) * key.pal);
ASSERT(key.pal == 16 || key.pal == 256);
return key.pal == 16 ?
XXH3_64bits(key.clut, sizeof(key.clut[0]) * 16) :
XXH3_64bits(key.clut, sizeof(key.clut[0]) * 256);
};
// GSTextureCache::PaletteKeyEqual