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) {