Fix forced_unit for unimplemented instructions

For SCT and SCB, the forced unit is always set to FORCE_NONE before
handling of the instruction. This makes the error for unimplemented
instructions' forced unit be incorrect. This fixes that.
This commit is contained in:
Raul Tambre 2016-04-02 19:18:25 +03:00
parent 3ee56627eb
commit a8e15ce18a

View File

@ -616,6 +616,8 @@ std::string FragmentProgramDecompiler::Decompile()
case RSX_FP_OPCODE_KIL: SetDst("discard", false); break;
default:
int prev_force_unit = forced_unit;
if (forced_unit == FORCE_NONE)
{
if (SIP()) break;
@ -634,7 +636,7 @@ std::string FragmentProgramDecompiler::Decompile()
if (handle_scb(opcode)) break;
}
LOG_ERROR(RSX, "Unknown/illegal instruction: 0x%x (forced unit %d)", opcode, forced_unit);
LOG_ERROR(RSX, "Unknown/illegal instruction: 0x%x (forced unit %d)", opcode, prev_force_unit);
break;
}