summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-06-16 01:41:23 +0200
committerbunnei <bunneidev@gmail.com>2018-06-16 02:43:33 +0200
commit61f9d9c4ab488a4a892ed107c56f85b84c775c17 (patch)
treea15a22ab2db0d703df114c2ca0c1070d108915bc /src
parentMerge pull request #560 from Subv/crash_widget (diff)
downloadyuzu-61f9d9c4ab488a4a892ed107c56f85b84c775c17.tar
yuzu-61f9d9c4ab488a4a892ed107c56f85b84c775c17.tar.gz
yuzu-61f9d9c4ab488a4a892ed107c56f85b84c775c17.tar.bz2
yuzu-61f9d9c4ab488a4a892ed107c56f85b84c775c17.tar.lz
yuzu-61f9d9c4ab488a4a892ed107c56f85b84c775c17.tar.xz
yuzu-61f9d9c4ab488a4a892ed107c56f85b84c775c17.tar.zst
yuzu-61f9d9c4ab488a4a892ed107c56f85b84c775c17.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 7ce150fda..9093eca32 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -930,20 +930,26 @@ private:
if (instr.alu.lop.invert_b)
imm = ~imm;
+ std::string op_b = std::to_string(imm);
+
switch (instr.alu.lop.operation) {
case Tegra::Shader::LogicOperation::And: {
- regs.SetRegisterToInteger(instr.gpr0, true, 0,
- '(' + op_a + " & " + std::to_string(imm) + ')', 1, 1);
+ regs.SetRegisterToInteger(instr.gpr0, true, 0, '(' + op_a + " & " + op_b + ')',
+ 1, 1);
break;
}
case Tegra::Shader::LogicOperation::Or: {
- regs.SetRegisterToInteger(instr.gpr0, true, 0,
- '(' + op_a + " | " + std::to_string(imm) + ')', 1, 1);
+ regs.SetRegisterToInteger(instr.gpr0, true, 0, '(' + op_a + " | " + op_b + ')',
+ 1, 1);
break;
}
case Tegra::Shader::LogicOperation::Xor: {
- regs.SetRegisterToInteger(instr.gpr0, true, 0,
- '(' + op_a + " ^ " + std::to_string(imm) + ')', 1, 1);
+ regs.SetRegisterToInteger(instr.gpr0, true, 0, '(' + op_a + " ^ " + op_b + ')',
+ 1, 1);
+ break;
+ }
+ case Tegra::Shader::LogicOperation::PassB: {
+ regs.SetRegisterToInteger(instr.gpr0, true, 0, op_b, 1, 1);
break;
}
default: