Mesa (master): zink: invalidate pipeline hash on more changes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 14 04:46:14 UTC 2020


Module: Mesa
Branch: master
Commit: f024bc8314cfb94df6b321cc5e639a6c107f375b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f024bc8314cfb94df6b321cc5e639a6c107f375b

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Aug 10 14:49:58 2020 -0400

zink: invalidate pipeline hash on more changes

some cases were missed here, causing an assert to trigger

Fixes: 1185b3f32d9 "zink: pre-hash gfx-pipeline-state"

Reviewed-by: Antonio Caggiano <antonio.caggiano at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6262>

---

 src/gallium/drivers/zink/zink_context.c | 2 ++
 src/gallium/drivers/zink/zink_draw.c    | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 786de9c095c..7d397a1dc60 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -321,6 +321,7 @@ zink_set_vertex_buffers(struct pipe_context *pctx,
             res->needs_xfb_barrier = false;
          }
       }
+      ctx->gfx_pipeline_state.hash = 0;
    }
 
    util_set_vertex_buffers_mask(ctx->buffers, &ctx->buffers_enabled_mask,
@@ -632,6 +633,7 @@ zink_set_sample_mask(struct pipe_context *pctx, unsigned sample_mask)
 {
    struct zink_context *ctx = zink_context(pctx);
    ctx->gfx_pipeline_state.sample_mask = sample_mask;
+   ctx->gfx_pipeline_state.hash = 0;
 }
 
 static VkAccessFlags
diff --git a/src/gallium/drivers/zink/zink_draw.c b/src/gallium/drivers/zink/zink_draw.c
index 9ce51ea0bee..b103d089df3 100644
--- a/src/gallium/drivers/zink/zink_draw.c
+++ b/src/gallium/drivers/zink/zink_draw.c
@@ -234,6 +234,8 @@ zink_draw_vbo(struct pipe_context *pctx,
    if (!gfx_program)
       return;
 
+   if (ctx->gfx_pipeline_state.primitive_restart != !!dinfo->primitive_restart)
+      ctx->gfx_pipeline_state.hash = 0;
    ctx->gfx_pipeline_state.primitive_restart = !!dinfo->primitive_restart;
 
    VkPipeline pipeline = zink_get_gfx_pipeline(screen, gfx_program,



More information about the mesa-commit mailing list