From f024bc8314cfb94df6b321cc5e639a6c107f375b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 10 Aug 2020 14:49:58 -0400 Subject: [PATCH] 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 Part-of: --- 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, -- 2.30.2