diff options
author | Lionel Landwerlin <[email protected]> | 2019-12-12 17:51:26 +0200 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-12-16 14:59:10 +0200 |
commit | bc36160ccb07a662b2cfd7f0dec56e9c3f4f5aff (patch) | |
tree | be94b109706a7ccc4671608ddaf0b13d8736417d /src | |
parent | c05619328888f006b960f7e39dd70801e539debc (diff) |
vulkan/wsi: error out when image fence doesn't signal
If for some reason the fence associated with an image doesn't signal,
we're likely in a device lost scenario, we should report that error.
We can't really wait for a given amount of time because we could get a
timeout and that is not a valid error to report for vkQueuePresentKHR,
so just wait forever.
Signed-off-by: Lionel Landwerlin <[email protected]>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/830
Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 65ab543cc5d..e45810d9c5d 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -1057,10 +1057,16 @@ wsi_common_queue_present(const struct wsi_device *wsi, if (result != VK_SUCCESS) goto fail_present; } else { - wsi->WaitForFences(device, 1, &swapchain->fences[image_index], - true, 1); + result = + wsi->WaitForFences(device, 1, &swapchain->fences[image_index], + true, ~0ull); + if (result != VK_SUCCESS) + goto fail_present; - wsi->ResetFences(device, 1, &swapchain->fences[image_index]); + result = + wsi->ResetFences(device, 1, &swapchain->fences[image_index]); + if (result != VK_SUCCESS) + goto fail_present; } struct wsi_image *image = |