| 138 | } |
| 139 | |
| 140 | bool GSClut::InvalidateRange(u32 start_block, u32 end_block, bool is_draw) |
| 141 | { |
| 142 | if (m_write.dirty & 2) |
| 143 | return m_write.dirty; |
| 144 | |
| 145 | GIFRegTEX0 next_cbp; |
| 146 | next_cbp.U64 = m_write.next_tex0; |
| 147 | |
| 148 | // Handle wrapping writes. Star Wars Battlefront 2 does this. |
| 149 | if ((end_block & 0xFFE0) < (start_block & 0xFFE0)) |
| 150 | { |
| 151 | if ((next_cbp.CBP + 3U) <= end_block) |
| 152 | next_cbp.CBP += 0x4000; |
| 153 | |
| 154 | end_block += 0x4000; |
| 155 | } |
| 156 | |
| 157 | if ((next_cbp.CBP + 3U) >= start_block && end_block >= next_cbp.CBP) |
| 158 | { |
| 159 | m_write.dirty |= is_draw ? 2 : 1; |
| 160 | } |
| 161 | |
| 162 | return m_write.dirty; |
| 163 | } |
| 164 | |
| 165 | bool GSClut::CanLoadCLUT(const GIFRegTEX0& TEX0, const bool update_CBP) |
| 166 | { |
no outgoing calls
no test coverage detected