diff options
author | bunnei <bunneidev@gmail.com> | 2018-07-08 04:33:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 04:33:50 +0200 |
commit | 639346bcfba26a84ec80bda1ffd3a383f1e4c159 (patch) | |
tree | 7638332bac68ba353d6511a302e6cd2cdb3ff163 /src/video_core/renderer_opengl | |
parent | Merge pull request #627 from Subv/bc7u (diff) | |
parent | GPU: Implemented the IMNMX shader instruction. (diff) | |
download | yuzu-639346bcfba26a84ec80bda1ffd3a383f1e4c159.tar yuzu-639346bcfba26a84ec80bda1ffd3a383f1e4c159.tar.gz yuzu-639346bcfba26a84ec80bda1ffd3a383f1e4c159.tar.bz2 yuzu-639346bcfba26a84ec80bda1ffd3a383f1e4c159.tar.lz yuzu-639346bcfba26a84ec80bda1ffd3a383f1e4c159.tar.xz yuzu-639346bcfba26a84ec80bda1ffd3a383f1e4c159.tar.zst yuzu-639346bcfba26a84ec80bda1ffd3a383f1e4c159.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 14 |
1 files changed, 14 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 e817aca5a..5914077e8 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1127,6 +1127,20 @@ private: WriteLogicOperation(instr.gpr0, instr.alu.lop.operation, op_a, op_b); break; } + case OpCode::Id::IMNMX_C: + case OpCode::Id::IMNMX_R: + case OpCode::Id::IMNMX_IMM: { + ASSERT_MSG(instr.imnmx.exchange == Tegra::Shader::IMinMaxExchange::None, + "Unimplemented"); + std::string condition = + GetPredicateCondition(instr.imnmx.pred, instr.imnmx.negate_pred != 0); + std::string parameters = op_a + ',' + op_b; + regs.SetRegisterToInteger(instr.gpr0, instr.imnmx.is_signed, 0, + '(' + condition + ") ? min(" + parameters + ") : max(" + + parameters + ')', + 1, 1); + break; + } default: { LOG_CRITICAL(HW_GPU, "Unhandled ArithmeticInteger instruction: {}", opcode->GetName()); |