Mesa (main): vulkan/wsi: Reset fences earlier in wsi_common_queue_present
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 10 02:14:02 UTC 2022
Module: Mesa
Branch: main
Commit: bee3d2e156ad9db8169b3bb69d3da86279dbf326
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bee3d2e156ad9db8169b3bb69d3da86279dbf326
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Thu May 19 20:05:21 2022 -0500
vulkan/wsi: Reset fences earlier in wsi_common_queue_present
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>
---
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) {
More information about the mesa-commit
mailing list