zink: move descriptor update closer to start of draw

this can trigger flushes, so ensure that it doesn't break the cmdbuf

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11746>
This commit is contained in:
Mike Blumenkrantz
2021-07-06 21:41:51 -04:00
committed by Marge Bot
parent 6f4dc4b6b8
commit 47ba3b799f
+3 -3
View File
@@ -434,6 +434,9 @@ zink_draw_vbo(struct pipe_context *pctx,
ctx->gfx_prim_mode = dinfo->mode;
update_gfx_program(ctx);
if (zink_program_has_descriptors(&ctx->curr_program->base))
screen->descriptors_update(ctx, false);
if (ctx->gfx_pipeline_state.primitive_restart != dinfo->primitive_restart)
ctx->gfx_pipeline_state.dirty = true;
ctx->gfx_pipeline_state.primitive_restart = dinfo->primitive_restart;
@@ -463,9 +466,6 @@ zink_draw_vbo(struct pipe_context *pctx,
barrier_draw_buffers(ctx, dinfo, dindirect, index_buffer);
if (zink_program_has_descriptors(&ctx->curr_program->base))
screen->descriptors_update(ctx, false);
if (ctx->descriptor_refs_dirty[0])
zink_update_descriptor_refs(ctx, false);