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/half_set.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/half_set.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/video_core/shader/decode/half_set.cpp b/src/video_core/shader/decode/half_set.cpp index d07625741..1dd94bf9d 100644 --- a/src/video_core/shader/decode/half_set.cpp +++ b/src/video_core/shader/decode/half_set.cpp @@ -22,9 +22,9 @@ u32 ShaderIR::DecodeHalfSet(NodeBlock& bb, u32 pc) { LOG_WARNING(HW_GPU, "{} FTZ not implemented", opcode->get().GetName()); } - // instr.hset2.type_a - // instr.hset2.type_b - Node op_a = GetRegister(instr.gpr8); + Node op_a = UnpackHalfFloat(GetRegister(instr.gpr8), instr.hset2.type_a); + op_a = GetOperandAbsNegHalf(op_a, instr.hset2.abs_a, instr.hset2.negate_a); + Node op_b = [&]() { switch (opcode->get().GetId()) { case OpCode::Id::HSET2_R: @@ -34,14 +34,12 @@ u32 ShaderIR::DecodeHalfSet(NodeBlock& bb, u32 pc) { return Immediate(0); } }(); - - op_a = GetOperandAbsNegHalf(op_a, instr.hset2.abs_a, instr.hset2.negate_a); + op_b = UnpackHalfFloat(op_b, instr.hset2.type_b); op_b = GetOperandAbsNegHalf(op_b, instr.hset2.abs_b, instr.hset2.negate_b); const Node second_pred = GetPredicate(instr.hset2.pred39, instr.hset2.neg_pred); - MetaHalfArithmetic meta{false, {instr.hset2.type_a, instr.hset2.type_b}}; - const Node comparison_pair = GetPredicateComparisonHalf(instr.hset2.cond, meta, op_a, op_b); + const Node comparison_pair = GetPredicateComparisonHalf(instr.hset2.cond, op_a, op_b); const OperationCode combiner = GetPredicateCombiner(instr.hset2.op); |