panfrost: Assert on sysval overflow
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
This commit is contained in:
parent
24867386ee
commit
f0109e9ac0
|
@ -123,6 +123,7 @@ panfrost_nir_assign_sysval_body(struct panfrost_sysvals *ctx, nir_instr *instr)
|
|||
/* It hasn't -- so assign it now! */
|
||||
|
||||
unsigned id = ctx->sysval_count++;
|
||||
assert(id < MAX_SYSVAL_COUNT);
|
||||
_mesa_hash_table_u64_insert(ctx->sysval_to_id, sysval, (void *) ((uintptr_t) id + 1));
|
||||
ctx->sysvals[id] = sysval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue