vulkan/wsi: Reset fences earlier in wsi_common_queue_present

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>
This commit is contained in:
Jason Ekstrand
2022-05-19 20:05:21 -05:00
committed by Marge Bot
parent d211f4891a
commit bee3d2e156

View File

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