mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-17 21:48:22 +02:00
agx: Assert that we don't overflow registers
This will become particularly important when we bound to smaller register files. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22353>
This commit is contained in:
parent
7c7b95ba2a
commit
da9c8a4627
1 changed files with 1 additions and 0 deletions
|
|
@ -215,6 +215,7 @@ reserve_live_in(struct ra_ctx *rctx)
|
|||
static void
|
||||
assign_regs(struct ra_ctx *rctx, agx_index v, unsigned reg)
|
||||
{
|
||||
assert(reg < rctx->bound && "must not overflow register file");
|
||||
assert(v.type == AGX_INDEX_NORMAL && "only SSA gets registers allocated");
|
||||
rctx->ssa_to_reg[v.value] = reg;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue