From a8e15ce18ab49ab9f5420a6951bdecbe07b97235 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sat, 2 Apr 2016 19:18:25 +0300 Subject: [PATCH] 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. --- rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp index 6e1ec3c1b2..13cf23d71d 100644 --- a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp @@ -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; }