diff options
author | bunnei <bunneidev@gmail.com> | 2016-04-09 17:24:48 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-04-14 05:04:49 +0200 |
commit | 6e0319eec91341101505b944a652e0b635a51b6e (patch) | |
tree | 892faffcf9a8fa616ef715d5e90c721b87dbfd71 /src/video_core | |
parent | shader_jit_x64: Execute certain asserts at runtime. (diff) | |
download | yuzu-6e0319eec91341101505b944a652e0b635a51b6e.tar yuzu-6e0319eec91341101505b944a652e0b635a51b6e.tar.gz yuzu-6e0319eec91341101505b944a652e0b635a51b6e.tar.bz2 yuzu-6e0319eec91341101505b944a652e0b635a51b6e.tar.lz yuzu-6e0319eec91341101505b944a652e0b635a51b6e.tar.xz yuzu-6e0319eec91341101505b944a652e0b635a51b6e.tar.zst yuzu-6e0319eec91341101505b944a652e0b635a51b6e.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 7 | ||||
-rw-r--r-- | src/video_core/shader/shader_jit_x64.h | 1 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index dda9bcef7..fae7e8b41 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -677,7 +677,7 @@ void JitCompiler::Compile_MAD(Instruction instr) { } void JitCompiler::Compile_IF(Instruction instr) { - RuntimeAssert(instr.flow_control.dest_offset > last_program_counter, "Backwards if-statements not supported"); + RuntimeAssert(instr.flow_control.dest_offset >= program_counter, "Backwards if-statements not supported"); // Evaluate the "IF" condition if (instr.opcode.Value() == OpCode::Id::IFU) { @@ -708,7 +708,7 @@ void JitCompiler::Compile_IF(Instruction instr) { } void JitCompiler::Compile_LOOP(Instruction instr) { - RuntimeAssert(instr.flow_control.dest_offset > last_program_counter, "Backwards loops not supported"); + RuntimeAssert(instr.flow_control.dest_offset >= program_counter, "Backwards loops not supported"); RuntimeAssert(!looping, "Nested loops not supported"); looping = true; @@ -770,8 +770,6 @@ void JitCompiler::Compile_Return() { } void JitCompiler::Compile_NextInstr() { - last_program_counter = program_counter; - auto search = return_offsets.find(program_counter); if (search != return_offsets.end()) { Compile_Return(); @@ -839,7 +837,6 @@ void JitCompiler::Compile() { FindReturnOffsets(); // Reset flow control state - last_program_counter = 0; program_counter = 0; looping = false; code_ptr.fill(nullptr); diff --git a/src/video_core/shader/shader_jit_x64.h b/src/video_core/shader/shader_jit_x64.h index 159b902b2..920a269e2 100644 --- a/src/video_core/shader/shader_jit_x64.h +++ b/src/video_core/shader/shader_jit_x64.h @@ -108,7 +108,6 @@ private: /// Offsets in code where a return needs to be inserted std::set<unsigned> return_offsets; - unsigned last_program_counter = 0; ///< Offset of the most recent instruction decoded unsigned program_counter = 0; ///< Offset of the next instruction to decode bool looping = false; ///< True if compiling a loop, used to check for nested loops |