Currently we don't have a good mechanism for this other than being
careful... assert() at least. The long term plan is to lift the
UBO/VBO lowerings into NIR, making the sysval requirements visible in
the NIR. (And possibly moving to a descriptor set model to better match
Vulkan? I need to talk to jekstrand about what we want to do here long
term.)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
unsigned base = ctx->push_base;
ctx->push_base += length;
+ assert(ctx->push_base <= AGX_NUM_UNIFORMS);
ctx->out->push[ctx->out->push_ranges++] = (struct agx_push) {
.type = type,
unsigned base = ctx->push_base;
ctx->push_base += 4;
+ assert(ctx->push_base <= AGX_NUM_UNIFORMS);
ctx->out->push[ctx->out->push_ranges++] = (struct agx_push) {
.type = AGX_PUSH_VBO_BASE,