`fixup_draw_state()` was updating `ctx->dirty` after it had already been
copied into the emit struct, which had the result that we were not re-
emitting the rast state when primitive_restart changes.
Fixes: 4d8f42c8512 ("freedreno/a6xx: separate rast stateobj for prim restart")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3067
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117>
if (!fd6_ctx->prog)
return NULL;
+ fixup_draw_state(ctx, &emit);
+
emit.dirty = ctx->dirty; /* *after* fixup_shader_state() */
emit.bs = fd6_emit_get_prog(&emit)->bs;
emit.vs = fd6_emit_get_prog(&emit)->vs;
ctx->last.restart_index = restart_index;
}
- fixup_draw_state(ctx, &emit);
-
fd6_emit_state(ring, &emit);
/* for debug after a lock up, write a unique counter value