zink: just reference compute progs to batch on delete

eliminates a bunch of pointless refcounting

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37139>
This commit is contained in:
Mike Blumenkrantz
2025-09-09 08:44:20 -04:00
committed by Marge Bot
parent 1e07f58c62
commit 8eca6ee134

View File

@@ -2092,7 +2092,6 @@ zink_bind_cs_state(struct pipe_context *pctx,
ctx->shader_has_inlinable_uniforms_mask &= ~(1 << MESA_SHADER_COMPUTE);
if (ctx->curr_compute) {
zink_batch_reference_program(ctx, &ctx->curr_compute->base);
ctx->compute_pipeline_state.final_hash ^= ctx->compute_pipeline_state.module_hash;
ctx->compute_pipeline_state.module = VK_NULL_HANDLE;
ctx->compute_pipeline_state.module_hash = 0;
@@ -2131,6 +2130,7 @@ static void
zink_delete_cs_shader_state(struct pipe_context *pctx, void *cso)
{
struct zink_compute_program *comp = cso;
zink_batch_reference_program(zink_context(pctx), cso);
zink_compute_program_reference(zink_screen(pctx->screen), &comp, NULL);
}