zink: don't leak swapchain readback semaphores

these are considered usable after the queue goes idle, so add them
back into the cache

Fixes: e9f18f64b9 ("zink: also cache swapchain semaphores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23033>
This commit is contained in:
Mike Blumenkrantz 2023-05-15 09:13:35 -04:00 committed by Marge Bot
parent 6c90fe189f
commit cd0454646f

View file

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