mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
ra: assert against unsigned underflow in q_total
q_total should never go below 0 (which is why it's defined as unsigned), and if it does, then something is seriously wrong. Signed-off-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
ec046bc08e
commit
2828680e39
1 changed files with 1 additions and 0 deletions
|
|
@ -434,6 +434,7 @@ decrement_q(struct ra_graph *g, unsigned int n)
|
|||
unsigned int n2_class = g->nodes[n2].class;
|
||||
|
||||
if (n != n2 && !g->nodes[n2].in_stack) {
|
||||
assert(g->nodes[n2].q_total >= g->regs->classes[n2_class]->q[n_class]);
|
||||
g->nodes[n2].q_total -= g->regs->classes[n2_class]->q[n_class];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue