mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
aco/optimizer: fix uses in to_uniform_bool_instr
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38724>
This commit is contained in:
parent
3b4d2c41f0
commit
ad3add311c
1 changed files with 4 additions and 1 deletions
|
|
@ -4485,6 +4485,7 @@ to_uniform_bool_instr(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
continue;
|
||||
|
||||
ctx.uses[op.tempId()]--;
|
||||
bool increase_uses = ctx.uses[op.tempId()];
|
||||
|
||||
if (ctx.info[op.tempId()].is_uniform_bool()) {
|
||||
/* Just use the uniform boolean temp. */
|
||||
|
|
@ -4500,11 +4501,13 @@ to_uniform_bool_instr(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
assert(pred_instr->definitions[1].isFixed() &&
|
||||
pred_instr->definitions[1].physReg() == scc);
|
||||
op.setTemp(pred_instr->definitions[1].getTemp());
|
||||
increase_uses = true;
|
||||
} else {
|
||||
UNREACHABLE("Invalid operand on uniform bitwise instruction.");
|
||||
}
|
||||
|
||||
ctx.uses[op.tempId()]++;
|
||||
if (increase_uses)
|
||||
ctx.uses[op.tempId()]++;
|
||||
}
|
||||
|
||||
instr->definitions[0].setTemp(Temp(instr->definitions[0].tempId(), s1));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue