diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-16 00:48:11 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-16 02:16:10 +0200 |
commit | f43995ec535042d24fa1af637642a2974bfa4773 (patch) | |
tree | 9b5526da635742d96d7e3d95d6fd2e95dd5b1399 /src/video_core/shader/decode/arithmetic_half.cpp | |
parent | gl_shader_decompiler: Fix MrgH0 decompilation (diff) | |
download | yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.gz yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.bz2 yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.lz yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.xz yuzu-f43995ec535042d24fa1af637642a2974bfa4773.tar.zst yuzu-f43995ec535042d24fa1af637642a2974bfa4773.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/decode/arithmetic_half.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/shader/decode/arithmetic_half.cpp b/src/video_core/shader/decode/arithmetic_half.cpp index 8cf49314d..9467f9417 100644 --- a/src/video_core/shader/decode/arithmetic_half.cpp +++ b/src/video_core/shader/decode/arithmetic_half.cpp @@ -29,9 +29,8 @@ u32 ShaderIR::DecodeArithmeticHalf(NodeBlock& bb, u32 pc) { const bool negate_b = opcode->get().GetId() != OpCode::Id::HMUL2_C && instr.alu_half.negate_b != 0; - const Node op_a = GetOperandAbsNegHalf(GetRegister(instr.gpr8), instr.alu_half.abs_a, negate_a); - - // instr.alu_half.type_a + Node op_a = UnpackHalfFloat(GetRegister(instr.gpr8), instr.alu_half.type_a); + op_a = GetOperandAbsNegHalf(op_a, instr.alu_half.abs_a, negate_a); Node op_b = [&]() { switch (opcode->get().GetId()) { @@ -46,17 +45,17 @@ u32 ShaderIR::DecodeArithmeticHalf(NodeBlock& bb, u32 pc) { return Immediate(0); } }(); + op_b = UnpackHalfFloat(op_b, instr.alu_half.type_b); op_b = GetOperandAbsNegHalf(op_b, instr.alu_half.abs_b, negate_b); Node value = [&]() { - MetaHalfArithmetic meta{true, {instr.alu_half_imm.type_a, instr.alu_half.type_b}}; switch (opcode->get().GetId()) { case OpCode::Id::HADD2_C: case OpCode::Id::HADD2_R: - return Operation(OperationCode::HAdd, meta, op_a, op_b); + return Operation(OperationCode::HAdd, PRECISE, op_a, op_b); case OpCode::Id::HMUL2_C: case OpCode::Id::HMUL2_R: - return Operation(OperationCode::HMul, meta, op_a, op_b); + return Operation(OperationCode::HMul, PRECISE, op_a, op_b); default: UNIMPLEMENTED_MSG("Unhandled half float instruction: {}", opcode->get().GetName()); return Immediate(0); |