Mesa (main): zink: move descriptor update closer to start of draw

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 7 03:16:05 UTC 2021


Module: Mesa
Branch: main
Commit: 47ba3b799f5866cdc2f178531edc52a669f69375
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=47ba3b799f5866cdc2f178531edc52a669f69375

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Jul  6 21:41:51 2021 -0400

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 at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11746>

---

 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 1936f4effb0..613fccd975b 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);
 



More information about the mesa-commit mailing list