From bee3d2e156ad9db8169b3bb69d3da86279dbf326 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 19 May 2022 20:05:21 -0500 Subject: [PATCH] vulkan/wsi: Reset fences earlier in wsi_common_queue_present Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Lionel Landwerlin Part-of: --- src/vulkan/wsi/wsi_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index d3394f1b4e5..ac6a11129ad 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -984,6 +984,10 @@ wsi_common_queue_present(const struct wsi_device *wsi, goto fail_present; } + result = wsi->ResetFences(device, 1, &swapchain->fences[image_index]); + if (result != VK_SUCCESS) + goto fail_present; + struct wsi_image *image = swapchain->get_wsi_image(swapchain, image_index); @@ -1007,10 +1011,6 @@ wsi_common_queue_present(const struct wsi_device *wsi, submit_info.pWaitDstStageMask = stage_flags; } - result = wsi->ResetFences(device, 1, &swapchain->fences[image_index]); - if (result != VK_SUCCESS) - goto fail_present; - VkFence fence = swapchain->fences[image_index]; if (swapchain->use_buffer_blit) { if (swapchain->buffer_blit_queue == VK_NULL_HANDLE) {