r300/compiler: Silence array-bounds warning

Suggested-by: @eric

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35853>
This commit is contained in:
Valentine Burley 2025-08-14 10:54:54 +02:00 committed by Marge Bot
parent 98736e55e0
commit 57334b9cf1

View file

@ -477,10 +477,13 @@ rc_init_regalloc_state(struct rc_regalloc_state *s, enum rc_program_type prog)
for (i = 0; i < class_count; i++) {
ra_q_values[i] = MALLOC(class_count * sizeof(unsigned));
for (j = 0; j < class_count; j++) {
if (prog == RC_FRAGMENT_PROGRAM)
if (prog == RC_FRAGMENT_PROGRAM) {
assume(j < RC_REG_CLASS_FP_COUNT);
ra_q_values[i][j] = q_values_fp[i][j];
else
} else {
assume(j < RC_REG_CLASS_VP_COUNT);
ra_q_values[i][j] = q_values_vp[i][j];
}
}
}