freedreno/a6xx: assert valid vertex_flags reg

If this somehow gets optimized out, the GS will run forever.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17341>
This commit is contained in:
Rob Clark
2022-07-01 14:29:00 -07:00
committed by Marge Bot
parent bbcb881f46
commit e16c46c6a8

View File

@@ -991,6 +991,9 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_context *ctx,
uint32_t flags_regid =
ir3_find_output_regid(gs, VARYING_SLOT_GS_VERTEX_FLAGS_IR3);
/* if vertex_flags somehow gets optimized out, your gonna have a bad time: */
assert(flags_regid != INVALID_REG);
OUT_PKT4(ring, REG_A6XX_SP_GS_PRIMITIVE_CNTL, 1);
OUT_RING(ring, A6XX_SP_GS_PRIMITIVE_CNTL_OUT(l.cnt) |
A6XX_SP_GS_PRIMITIVE_CNTL_FLAGS_REGID(flags_regid));