From: Mike Blumenkrantz Date: Mon, 10 Aug 2020 18:49:58 +0000 (-0400) Subject: zink: invalidate pipeline hash on more changes X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=f024bc8314cfb94df6b321cc5e639a6c107f375b 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: --- 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,