From ba54f0e9ca6c6edf09b8d1dba2507a4a8d0533f1 Mon Sep 17 00:00:00 2001 From: Iason Paraskevopoulos Date: Mon, 27 Sep 2021 09:34:04 +0100 Subject: [PATCH] Remove destroy_image from unpresent function Fixes an issue, where in Wayland the new swapchain hanged during its first image presentation in the page flipping thread when it waited for the old swapchain to finish presenting its pending images. As the new swapchain had started presenting destroy_image was called during the unpresent function for the old swapchain and the image's status was set to INVALID instead of FREE. So free_image_found never returned true and subsequently get_free_buffer was blocked in the loop. The issue is fixed by removing the call to destroy_image in unpresent_image as it is redundant and is done in swapchain teardown. Change-Id: I192607f50eb5e5f0e4e9baf66aedf02221f20b63 Signed-off-by: Iason Paraskevopoulos --- wsi/swapchain_base.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wsi/swapchain_base.cpp b/wsi/swapchain_base.cpp index c35c0ff..f5c3fb7 100644 --- a/wsi/swapchain_base.cpp +++ b/wsi/swapchain_base.cpp @@ -125,10 +125,6 @@ void swapchain_base::unpresent_image(uint32_t presented_index) m_swapchain_images[presented_index].status = swapchain_image::FREE; - if (m_descendant != VK_NULL_HANDLE) - { - destroy_image(m_swapchain_images[presented_index]); - } image_status_lock.unlock(); m_free_image_semaphore.post(); } -- 2.7.4