diff options
| author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-01-24 20:20:39 -0800 |
|---|---|---|
| committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-01-24 20:29:06 -0800 |
| commit | 083d2d89a5ef0d5f61de60bd241e65f43289a381 (patch) | |
| tree | a763dde5a7df8470d076997ae277fbaef73b6388 /src/video_core/shader/shader_interpreter.cpp | |
| parent | 0b6cc0592dec5584d1a2211e9d777f0b2640faea (diff) | |
Shader: Implement "invert condition" feature of IFU instruction
If the bit 0 of the JMPU instruction is set, then the jump condition
will be inverted. That is, a jump will happen when the boolean is false
instead of when it is true.
Diffstat (limited to 'src/video_core/shader/shader_interpreter.cpp')
| -rw-r--r-- | src/video_core/shader/shader_interpreter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp index 7b0c20b74..aeced71b0 100644 --- a/src/video_core/shader/shader_interpreter.cpp +++ b/src/video_core/shader/shader_interpreter.cpp @@ -515,7 +515,8 @@ void RunInterpreter(UnitState<Debug>& state) { case OpCode::Id::JMPU: Record<DebugDataRecord::COND_BOOL_IN>(state.debug, iteration, uniforms.b[instr.flow_control.bool_uniform_id]); - if (uniforms.b[instr.flow_control.bool_uniform_id]) { + + if (uniforms.b[instr.flow_control.bool_uniform_id] == !(instr.flow_control.num_instructions & 1)) { state.program_counter = instr.flow_control.dest_offset - 1; } break; |
