mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 00:20:11 +01:00
aco: fix branch definition validation
Like how they have to be register allocated differently, branch definitions at merge block predecessors need to be validated differently. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13432>
This commit is contained in:
parent
bed5a31005
commit
32d0bae8ec
1 changed files with 9 additions and 1 deletions
|
|
@ -1133,7 +1133,8 @@ validate_ra(Program* program)
|
|||
}
|
||||
}
|
||||
|
||||
err |= validate_instr_defs(program, regs, assignments, loc, instr);
|
||||
if (!instr->isBranch() || block.linear_succs.size() != 1)
|
||||
err |= validate_instr_defs(program, regs, assignments, loc, instr);
|
||||
|
||||
if (!is_phi(instr)) {
|
||||
for (const Operand& op : instr->operands) {
|
||||
|
|
@ -1144,6 +1145,13 @@ validate_ra(Program* program)
|
|||
regs[op.physReg().reg_b + j] = 0;
|
||||
}
|
||||
}
|
||||
} else if (block.linear_preds.size() != 1 ||
|
||||
program->blocks[block.linear_preds[0]].linear_succs.size() == 1) {
|
||||
for (unsigned pred : block.linear_preds) {
|
||||
aco_ptr<Instruction>& br = program->blocks[pred].instructions.back();
|
||||
assert(br->isBranch());
|
||||
err |= validate_instr_defs(program, regs, assignments, loc, br);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue