ir3/parser: set constlen when adding const regs

Since we don't set constlen anymore based on static const reg usage,
computerator was broken. Fix this by setting constlen for @const et al.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 4e456ebde4 ("ir3/collect_info: remove max_const calculation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40940>
This commit is contained in:
Job Noorman 2026-04-14 09:11:29 +02:00 committed by Marge Bot
parent 4808037f6e
commit 0e95730be0

View file

@ -252,6 +252,7 @@ add_const(unsigned reg, unsigned c0, unsigned c1, unsigned c2, unsigned c3)
for (unsigned i = imm_state->size; i < idx * 4; i++)
imm_state->values[i] = 0xd0d0d0d0;
imm_state->size = imm_state->count = idx * 4 + 4;
variant->constlen = MAX2(variant->constlen, imm_state->size / 4);
}
imm_state->values[idx * 4 + 0] = c0;
imm_state->values[idx * 4 + 1] = c1;