summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-08 04:33:50 +0200
committerGitHub <noreply@github.com>2018-07-08 04:33:50 +0200
commit639346bcfba26a84ec80bda1ffd3a383f1e4c159 (patch)
tree7638332bac68ba353d6511a302e6cd2cdb3ff163 /src/video_core/renderer_opengl
parentMerge pull request #627 from Subv/bc7u (diff)
parentGPU: Implemented the IMNMX shader instruction. (diff)
downloadyuzu-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.cpp14
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());