CPU/Recompiler: Flush load delay when lwl/lwr is first instruction

Fixes corrupted textures in Zen Nihon Joshi Pro Wrestling - Joou
Densetsu - Yume no Taikousen.
This commit is contained in:
Connor McLaughlin 2021-06-22 14:48:00 +10:00
parent 5a8320b63a
commit 7ac537bf73
1 changed files with 10 additions and 0 deletions

View File

@ -1605,6 +1605,16 @@ bool CodeGenerator::Compile_LoadLeftRight(const CodeBlockInstruction& cbi)
} }
else else
{ {
// if this is the first instruction in the block, we need to stall until the load finishes
// we don't actually care if it's our target reg or not, if it's not, it won't affect anything
if (m_load_delay_dirty)
{
Log_DevPrintf("Flushing interpreter load delay for lwl/lwr instruction at 0x%08X", cbi.pc);
EmitFlushInterpreterLoadDelay();
m_register_cache.InvalidateGuestRegister(cbi.instruction.r.rt);
m_load_delay_dirty = false;
}
value = m_register_cache.ReadGuestRegister(cbi.instruction.i.rt, true, true); value = m_register_cache.ReadGuestRegister(cbi.instruction.i.rt, true, true);
} }