| 203 | } |
| 204 | |
| 205 | bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT) |
| 206 | { |
| 207 | // Check if PSM is an indexed format BEFORE the load condition, updating CBP0/1 on an invalid format is not allowed |
| 208 | // and can break games. Corvette (NTSC) is a good example of this. |
| 209 | if ((TEX0.PSM & 0x7) < 3) |
| 210 | return false; |
| 211 | |
| 212 | if (!CanLoadCLUT(TEX0, true)) |
| 213 | return false; |
| 214 | |
| 215 | // CLUT only reloads if PSM is a valid index type, avoid unnecessary flushes. |
| 216 | return m_write.IsDirty(TEX0, TEXCLUT); |
| 217 | } |
| 218 | |
| 219 | void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT) |
| 220 | { |