mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 18:10:17 +01:00
vulkan/wsi/wayland: fix acquire_next_image to report timeouts properly
The Vulkan Specification states about possible return values from vkAcquireNextImageKHR: * VK_NOT_READY is returned if timeout is zero and no image was available. * VK_TIMEOUT is returned if timeout is greater than zero and less than UINT64_MAX, and no image beae available within the time allowed. That is, if info->timeout is larger than zero, the function must return VK_TIMEOUT instead of VK_NOT_READY if no image became available before the timeout elapsed. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21190>
This commit is contained in:
parent
75ccf7c003
commit
f29f656530
1 changed files with 1 additions and 1 deletions
|
|
@ -1497,7 +1497,7 @@ wsi_wl_swapchain_acquire_next_image(struct wsi_swapchain *wsi_chain,
|
|||
struct timespec current_time;
|
||||
clock_gettime(CLOCK_MONOTONIC, ¤t_time);
|
||||
if (timespec_after(¤t_time, &end_time))
|
||||
return VK_NOT_READY;
|
||||
return (info->timeout ? VK_TIMEOUT : VK_NOT_READY);
|
||||
|
||||
/* Try to read events from the server. */
|
||||
ret = wl_display_prepare_read_queue(wsi_wl_surface->display->wl_display,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue