From cd0454646fb07eb5cc673f3855d0e1c2b4c8032f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 15 May 2023 09:13:35 -0400 Subject: [PATCH] zink: don't leak swapchain readback semaphores these are considered usable after the queue goes idle, so add them back into the cache Fixes: e9f18f64b9e ("zink: also cache swapchain semaphores") Part-of: --- src/gallium/drivers/zink/zink_kopper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/zink/zink_kopper.c b/src/gallium/drivers/zink/zink_kopper.c index 50f63cb2ba7..24244be81b5 100644 --- a/src/gallium/drivers/zink/zink_kopper.c +++ b/src/gallium/drivers/zink/zink_kopper.c @@ -867,6 +867,9 @@ zink_kopper_present_readback(struct zink_context *ctx, struct zink_resource *res zink_kopper_present_queue(screen, res); error = VKSCR(QueueWaitIdle)(screen->queue); + simple_mtx_lock(&screen->semaphores_lock); + util_dynarray_append(&screen->semaphores, VkSemaphore, acquire); + simple_mtx_unlock(&screen->semaphores_lock); return zink_screen_handle_vkresult(screen, error); }