mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-13 17:50:13 +01:00
GSTextureCache: Compare also pal value in PaletteKey eq operator.
This commit is contained in:
1 parent
774373cc65
commit
e1dff69a43
1 file changed
+5
-5
@@ -2123,11 +2123,11 @@ std::size_t GSTextureCache::PaletteKeyHash::operator()(const PaletteKey &key) co
|
||||
|
||||
// Compare clut contents
|
||||
bool GSTextureCache::PaletteKeyEqual::operator()(const PaletteKey &lhs, const PaletteKey &rhs) const {
|
||||
ASSERT(lhs.pal == rhs.pal); // By design, each map SHOULD contain only PaletteKey with the same pal value
|
||||
|
||||
uint16 pal = lhs.pal;
|
||||
uint16 palette_size = pal * sizeof(uint32);
|
||||
return GSVector4i::compare64(lhs.clut, rhs.clut, palette_size);
|
||||
if (lhs.pal != rhs.pal) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return GSVector4i::compare64(lhs.clut, rhs.clut, lhs.pal * sizeof(lhs.clut[0]));
|
||||
};
|
||||
|
||||
// GSTextureCache::PaletteMap
|
||||
|
||||
Reference in new issue
Block a user