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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24811>
This commit is contained in:
Mike Blumenkrantz 2023-08-21 11:26:20 -04:00 committed by Marge Bot
parent 0a90994fce
commit ca987c0dfb

View file

@ -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]));