From: Rob Clark Date: Wed, 29 Jul 2020 17:14:34 +0000 (-0700) Subject: freedreno/a6xx: fixup draw state earlier X-Git-Tag: upstream/21.0.0~7005 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5558f2d2aa738d90b9e039144ae3ca69bdf92ca;p=platform%2Fupstream%2Fmesa.git freedreno/a6xx: fixup draw state earlier `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 Part-of: --- diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index 810bdf0..e95c400 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -210,6 +210,8 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, 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; @@ -303,8 +305,6 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, 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