freedreno/ir3: Add assert about const emit

If the old (non-ubo) way of const emit isn't supported for the shader
stage, make sure we hit an assert.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
This commit is contained in:
Rob Clark 2024-09-30 13:48:46 -07:00 committed by Marge Bot
parent 824733c4d7
commit 81d8387dbc

View file

@ -48,6 +48,8 @@ emit_const_asserts(struct fd_ringbuffer *ring,
const struct ir3_shader_variant *v, uint32_t regid,
uint32_t sizedwords)
{
assert((v->type == MESA_SHADER_VERTEX) ||
!v->compiler->load_shader_consts_via_preamble);
assert((regid % 4) == 0);
assert((sizedwords % 4) == 0);
assert(regid + sizedwords <= v->constlen * 4);