mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
vulkan/wsi/x11: Handle VK_NOT_READY in AcquireNextImage()
This check assumed that we would always get `VK_TIMEOUT` from
wsi_queue_pull() but the new explicit sync wait is smart enough to do
that for us. Unfortunately, the X11 code weasn't smart enough to know
that VK_NOT_READY (which is a positive return code) was also an early
exit condition.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12971
Fixes: 899263ecfc ("wsi/x11: support explicit sync")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tested-by: Adam Ivora
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36419>
This commit is contained in:
parent
1b55314615
commit
064b9e5645
1 changed files with 8 additions and 2 deletions
|
|
@ -1798,10 +1798,16 @@ x11_acquire_next_image(struct wsi_swapchain *wsi_chain,
|
|||
} else {
|
||||
result = wsi_queue_pull(&chain->acquire_queue,
|
||||
image_index, timeout);
|
||||
|
||||
/* x11_wait_for_explicit_sync_release_submission() is smart enough to do
|
||||
* this for us but wsi_queue_pull() isn't.
|
||||
*/
|
||||
if (result == VK_TIMEOUT && info->timeout == 0)
|
||||
result = VK_NOT_READY;
|
||||
}
|
||||
|
||||
if (result == VK_TIMEOUT)
|
||||
return info->timeout ? VK_TIMEOUT : VK_NOT_READY;
|
||||
if (result == VK_TIMEOUT || result == VK_NOT_READY)
|
||||
return result;
|
||||
|
||||
if (result < 0) {
|
||||
mtx_lock(&chain->thread_state_lock);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue