diff options
author | Subv <subv2112@gmail.com> | 2018-06-12 18:24:10 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-06-12 18:46:45 +0200 |
commit | db0497b808c8f092d55f3331e35eb37b83e496c8 (patch) | |
tree | 13133ab3fc15a4aa2734ca6f21649cabf37c1b98 /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | Merge pull request #555 from Subv/gpu_sysregs (diff) | |
download | yuzu-db0497b808c8f092d55f3331e35eb37b83e496c8.tar yuzu-db0497b808c8f092d55f3331e35eb37b83e496c8.tar.gz yuzu-db0497b808c8f092d55f3331e35eb37b83e496c8.tar.bz2 yuzu-db0497b808c8f092d55f3331e35eb37b83e496c8.tar.lz yuzu-db0497b808c8f092d55f3331e35eb37b83e496c8.tar.xz yuzu-db0497b808c8f092d55f3331e35eb37b83e496c8.tar.zst yuzu-db0497b808c8f092d55f3331e35eb37b83e496c8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 67726e7c6..920e52691 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1005,6 +1005,27 @@ private: break; } + case OpCode::Type::ArithmeticIntegerImmediate: { + std::string op_a = regs.GetRegisterAsInteger(instr.gpr8); + + if (instr.iadd32i.negate_a) + op_a = '-' + op_a; + + std::string op_b = '(' + std::to_string(instr.alu.imm20_32.Value()) + ')'; + + switch (opcode->GetId()) { + case OpCode::Id::IADD32I: + regs.SetRegisterToInteger(instr.gpr0, true, 0, op_a + " + " + op_b, 1, 1, + instr.iadd32i.saturate != 0); + break; + default: { + NGLOG_CRITICAL(HW_GPU, "Unhandled ArithmeticIntegerImmediate instruction: {}", + opcode->GetName()); + UNREACHABLE(); + } + } + break; + } case OpCode::Type::ArithmeticInteger: { std::string op_a = regs.GetRegisterAsInteger(instr.gpr8); |