diff options
| author | 2018-12-17 22:01:23 -0300 | |
|---|---|---|
| committer | 2019-01-15 17:54:52 -0300 | |
| commit | 518a2bd2060a5c1e6b9acb987439e0009d74fb43 (patch) | |
| tree | 1303c809f1c14a3d8748f36df01ce3f19837d78a /src | |
| parent | shader_decode: Implement F2F_C (diff) | |
| download | yuzu-518a2bd2060a5c1e6b9acb987439e0009d74fb43.tar.gz yuzu-518a2bd2060a5c1e6b9acb987439e0009d74fb43.tar.xz yuzu-518a2bd2060a5c1e6b9acb987439e0009d74fb43.zip | |
shader_decode: Implement IMNMX
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/decode/arithmetic_integer.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp index d494af736..dbdcebbb4 100644 --- a/src/video_core/shader/decode/arithmetic_integer.cpp +++ b/src/video_core/shader/decode/arithmetic_integer.cpp | |||
| @@ -79,6 +79,22 @@ u32 ShaderIR::DecodeArithmeticInteger(BasicBlock& bb, u32 pc) { | |||
| 79 | instr.alu.lop.pred_result_mode, instr.alu.lop.pred48); | 79 | instr.alu.lop.pred_result_mode, instr.alu.lop.pred48); |
| 80 | break; | 80 | break; |
| 81 | } | 81 | } |
| 82 | case OpCode::Id::IMNMX_C: | ||
| 83 | case OpCode::Id::IMNMX_R: | ||
| 84 | case OpCode::Id::IMNMX_IMM: { | ||
| 85 | UNIMPLEMENTED_IF(instr.imnmx.exchange != Tegra::Shader::IMinMaxExchange::None); | ||
| 86 | UNIMPLEMENTED_IF_MSG(instr.generates_cc, | ||
| 87 | "Condition codes generation in IMNMX is not implemented"); | ||
| 88 | |||
| 89 | const bool is_signed = instr.imnmx.is_signed; | ||
| 90 | |||
| 91 | const Node condition = GetPredicate(instr.imnmx.pred, instr.imnmx.negate_pred != 0); | ||
| 92 | const Node min = SignedOperation(OperationCode::IMin, is_signed, NO_PRECISE, op_a, op_b); | ||
| 93 | const Node max = SignedOperation(OperationCode::IMax, is_signed, NO_PRECISE, op_a, op_b); | ||
| 94 | const Node value = Operation(OperationCode::Select, NO_PRECISE, condition, min, max); | ||
| 95 | SetRegister(bb, instr.gpr0, value); | ||
| 96 | break; | ||
| 97 | } | ||
| 82 | default: | 98 | default: |
| 83 | UNIMPLEMENTED_MSG("Unhandled ArithmeticInteger instruction: {}", opcode->get().GetName()); | 99 | UNIMPLEMENTED_MSG("Unhandled ArithmeticInteger instruction: {}", opcode->get().GetName()); |
| 84 | } | 100 | } |