agx: add temp_like helper

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
Alyssa Rosenzweig 2024-02-22 08:29:21 -04:00 committed by Marge Bot
parent ffd2b846c4
commit 6bff596505

View file

@ -513,6 +513,13 @@ agx_temp(agx_context *ctx, enum agx_size size)
return agx_get_index(ctx->alloc++, size);
}
static inline agx_index
agx_temp_like(agx_context *ctx, agx_index idx)
{
idx.value = ctx->alloc++;
return idx;
}
static enum agx_size
agx_size_for_bits(unsigned bits)
{