From cb83f93d331e8ab2272d917cc339299eeceecf86 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Tue, 15 Jul 2025 11:59:00 -0400 Subject: [PATCH] c/client: don't call vkQueueWaitIdle in client_vk_swapchain_destroy Part-of: --- src/xrt/compositor/client/comp_vk_client.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/xrt/compositor/client/comp_vk_client.c b/src/xrt/compositor/client/comp_vk_client.c index 9e2cb04b3..86026c8cd 100644 --- a/src/xrt/compositor/client/comp_vk_client.c +++ b/src/xrt/compositor/client/comp_vk_client.c @@ -16,9 +16,6 @@ #include "comp_vk_client.h" -//! We are not allowed to touch the queue in xrDestroySwapchain -#define BREAK_OPENXR_SPEC_IN_DESTROY_SWAPCHAIN (true) - // Prefixed with OXR since the only user right now is the OpenXR state tracker. DEBUG_GET_ONCE_LOG_OPTION(vulkan_log, "OXR_VULKAN_LOG", U_LOGGING_INFO) @@ -273,13 +270,6 @@ client_vk_swapchain_destroy(struct xrt_swapchain *xsc) struct client_vk_compositor *c = sc->c; struct vk_bundle *vk = &c->vk; - // Make sure images are not used anymore. - if (BREAK_OPENXR_SPEC_IN_DESTROY_SWAPCHAIN) { - os_mutex_lock(&vk->queue_mutex); - vk->vkQueueWaitIdle(vk->main_queue.queue); - os_mutex_unlock(&vk->queue_mutex); - } - for (uint32_t i = 0; i < sc->base.base.image_count; i++) { if (sc->base.images[i] != VK_NULL_HANDLE) { vk->vkDestroyImage(vk->device, sc->base.images[i], NULL);