From 47ba3b799f5866cdc2f178531edc52a669f69375 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 6 Jul 2021 21:41:51 -0400 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/zink/zink_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/zink/zink_draw.c b/src/gallium/drivers/zink/zink_draw.c index 1936f4e..613fccd 100644 --- a/src/gallium/drivers/zink/zink_draw.c +++ b/src/gallium/drivers/zink/zink_draw.c @@ -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); -- 2.7.4