From ca987c0dfb97d22d3cf2632f38d9d749162767b0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 21 Aug 2023 11:26:20 -0400 Subject: [PATCH] zink: wait on async fence during ctx program removal removed=true implies that no async jobs are outstanding fixes #9580 cc: mesa-stable Part-of: --- src/gallium/drivers/zink/zink_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 1e3d774cf37..70af3659df1 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -132,6 +132,7 @@ zink_context_destroy(struct pipe_context *pctx) simple_mtx_lock((&ctx->program_lock[i])); hash_table_foreach(&ctx->program_cache[i], entry) { struct zink_program *pg = entry->data; + util_queue_fence_wait(&pg->cache_fence); pg->removed = true; } simple_mtx_unlock((&ctx->program_lock[i]));