mirror of https://github.com/PCSX2/pcsx2.git
GS: Don't process CLUT load condition on invalid PSM
This commit is contained in:
parent
5cc66e4d36
commit
8ac57db117
|
@ -118,6 +118,11 @@ void GSClut::Invalidate(u32 block)
|
||||||
|
|
||||||
bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
|
bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
|
||||||
{
|
{
|
||||||
|
// Check if PSM is an indexed format BEFORE the load condition, updating CBP0/1 on an invalid format is not allowed
|
||||||
|
// and can break games. Corvette (NTSC) is a good example of this.
|
||||||
|
if ((TEX0.PSM & 0x7) < 3)
|
||||||
|
return false;
|
||||||
|
|
||||||
switch (TEX0.CLD)
|
switch (TEX0.CLD)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -149,7 +154,7 @@ bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CLUT only reloads if PSM is a valid index type, avoid unnecessary flushes
|
// CLUT only reloads if PSM is a valid index type, avoid unnecessary flushes
|
||||||
return ((TEX0.PSM & 0x7) >= 3) && m_write.IsDirty(TEX0, TEXCLUT);
|
return m_write.IsDirty(TEX0, TEXCLUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
|
void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT)
|
||||||
|
|
Loading…
Reference in New Issue