diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/decode/half_set_predicate.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/video_core/shader/decode/half_set_predicate.cpp b/src/video_core/shader/decode/half_set_predicate.cpp index afea33e5f..840694527 100644 --- a/src/video_core/shader/decode/half_set_predicate.cpp +++ b/src/video_core/shader/decode/half_set_predicate.cpp | |||
| @@ -42,9 +42,8 @@ u32 ShaderIR::DecodeHalfSetPredicate(NodeBlock& bb, u32 pc) { | |||
| 42 | cond = instr.hsetp2.reg.cond; | 42 | cond = instr.hsetp2.reg.cond; |
| 43 | h_and = instr.hsetp2.reg.h_and; | 43 | h_and = instr.hsetp2.reg.h_and; |
| 44 | op_b = | 44 | op_b = |
| 45 | UnpackHalfFloat(GetOperandAbsNegHalf(GetRegister(instr.gpr20), instr.hsetp2.reg.abs_b, | 45 | GetOperandAbsNegHalf(UnpackHalfFloat(GetRegister(instr.gpr20), instr.hsetp2.reg.type_b), |
| 46 | instr.hsetp2.reg.negate_b), | 46 | instr.hsetp2.reg.abs_b, instr.hsetp2.reg.negate_b); |
| 47 | instr.hsetp2.reg.type_b); | ||
| 48 | break; | 47 | break; |
| 49 | default: | 48 | default: |
| 50 | UNREACHABLE(); | 49 | UNREACHABLE(); |
| @@ -52,22 +51,22 @@ u32 ShaderIR::DecodeHalfSetPredicate(NodeBlock& bb, u32 pc) { | |||
| 52 | } | 51 | } |
| 53 | 52 | ||
| 54 | const OperationCode combiner = GetPredicateCombiner(instr.hsetp2.op); | 53 | const OperationCode combiner = GetPredicateCombiner(instr.hsetp2.op); |
| 55 | const Node combined_pred = GetPredicate(instr.hsetp2.pred3, instr.hsetp2.neg_pred); | 54 | const Node combined_pred = GetPredicate(instr.hsetp2.pred39, instr.hsetp2.neg_pred); |
| 56 | 55 | ||
| 57 | const auto Write = [&](u64 dest, Node src) { | 56 | const auto Write = [&](u64 dest, Node src) { |
| 58 | SetPredicate(bb, dest, Operation(combiner, std::move(src), combined_pred)); | 57 | SetPredicate(bb, dest, Operation(combiner, std::move(src), combined_pred)); |
| 59 | }; | 58 | }; |
| 60 | 59 | ||
| 61 | const Node comparison = GetPredicateComparisonHalf(cond, op_a, op_b); | 60 | const Node comparison = GetPredicateComparisonHalf(cond, op_a, op_b); |
| 62 | const u64 first = instr.hsetp2.pred0; | 61 | const u64 first = instr.hsetp2.pred3; |
| 63 | const u64 second = instr.hsetp2.pred39; | 62 | const u64 second = instr.hsetp2.pred0; |
| 64 | if (h_and) { | 63 | if (h_and) { |
| 65 | const Node joined = Operation(OperationCode::LogicalAnd2, comparison); | 64 | Node joined = Operation(OperationCode::LogicalAnd2, comparison); |
| 66 | Write(first, joined); | 65 | Write(first, joined); |
| 67 | Write(second, Operation(OperationCode::LogicalNegate, joined)); | 66 | Write(second, Operation(OperationCode::LogicalNegate, std::move(joined))); |
| 68 | } else { | 67 | } else { |
| 69 | Write(first, Operation(OperationCode::LogicalPick2, comparison, Immediate(0u))); | 68 | Write(first, Operation(OperationCode::LogicalPick2, comparison, Immediate(0U))); |
| 70 | Write(second, Operation(OperationCode::LogicalPick2, comparison, Immediate(1u))); | 69 | Write(second, Operation(OperationCode::LogicalPick2, comparison, Immediate(1U))); |
| 71 | } | 70 | } |
| 72 | 71 | ||
| 73 | return pc; | 72 | return pc; |