aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/shader_jit_x64.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-01-26 09:58:16 -0500
committerbunnei <bunneidev@gmail.com>2016-01-26 09:58:16 -0500
commitc407b6ce2fbd6f438e5258bc14dc3def1a8c33e5 (patch)
tree8df2098c831d561bad520b08727b1af0958cc605 /src/video_core/shader/shader_jit_x64.cpp
parent01cb800256e9564d27cb442a14dba7c69156439e (diff)
parent083d2d89a5ef0d5f61de60bd241e65f43289a381 (diff)
Merge pull request #1369 from yuriks/jmpu-inverted
Shader: Implement "invert condition" feature of IFU instruction
Diffstat (limited to 'src/video_core/shader/shader_jit_x64.cpp')
-rw-r--r--src/video_core/shader/shader_jit_x64.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp
index 00415e402..6554830b2 100644
--- a/src/video_core/shader/shader_jit_x64.cpp
+++ b/src/video_core/shader/shader_jit_x64.cpp
@@ -710,7 +710,9 @@ void JitCompiler::Compile_JMP(Instruction instr) {
else
UNREACHABLE();
- FixupBranch b = J_CC(CC_NZ, true);
+ bool inverted_condition = (instr.opcode.Value() == OpCode::Id::JMPU) &&
+ (instr.flow_control.num_instructions & 1);
+ FixupBranch b = J_CC(inverted_condition ? CC_Z : CC_NZ, true);
Compile_Block(instr.flow_control.dest_offset);