zink: invalidate pipeline hash on more changes
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 10 Aug 2020 18:49:58 +0000 (14:49 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 14 Aug 2020 04:30:11 +0000 (04:30 +0000)
some cases were missed here, causing an assert to trigger

Fixes: 1185b3f32d9 "zink: pre-hash gfx-pipeline-state"
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6262>

src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_draw.c

index 786de9c095cec064cbfb36f5034d59a169078d06..7d397a1dc6086a2ac68f45467c1b66062760c1a0 100644 (file)
@@ -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
index 9ce51ea0beeaa9b9298ff4b3e270614e014dce3f..b103d089df3bb1cf647073ff5afd11264cead8ad 100644 (file)
@@ -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,