yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #2768 from ReinUsesLisp/hsetp2-fix

decode/half_set_predicate: Fix predicates
This commit is contained in:
bunnei 2019-08-18 08:50:54 -04:00 committed by GitHub
commit 87bbefe55f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -52,15 +52,15 @@ u32 ShaderIR::DecodeHalfSetPredicate(NodeBlock& bb, u32 pc) {
} }
const OperationCode combiner = GetPredicateCombiner(instr.hsetp2.op); const OperationCode combiner = GetPredicateCombiner(instr.hsetp2.op);
const Node pred39 = GetPredicate(instr.hsetp2.pred39, instr.hsetp2.neg_pred); const Node combined_pred = GetPredicate(instr.hsetp2.pred3, instr.hsetp2.neg_pred);
const auto Write = [&](u64 dest, Node src) { const auto Write = [&](u64 dest, Node src) {
SetPredicate(bb, dest, Operation(combiner, std::move(src), pred39)); SetPredicate(bb, dest, Operation(combiner, std::move(src), combined_pred));
}; };
const Node comparison = GetPredicateComparisonHalf(cond, op_a, op_b); const Node comparison = GetPredicateComparisonHalf(cond, op_a, op_b);
const u64 first = instr.hsetp2.pred0; const u64 first = instr.hsetp2.pred0;
const u64 second = instr.hsetp2.pred3; const u64 second = instr.hsetp2.pred39;
if (h_and) { if (h_and) {
const Node joined = Operation(OperationCode::LogicalAnd2, comparison); const Node joined = Operation(OperationCode::LogicalAnd2, comparison);
Write(first, joined); Write(first, joined);