mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
wsi/x11: xcb_wait_for_special_event failure is an error
The only ways that function can return NULL are: - the xcb connection was closed - the window for the swapchain was destroyed - the special event listener was unregistered from another thread - malloc failure All of these are permanent errors, the swapchain is no longer in a usable state, so we should treat this as VK_ERROR_SURFACE_LOST_KHR. Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15558>
This commit is contained in:
parent
f31208f778
commit
8006179cfd
1 changed files with 2 additions and 2 deletions
|
|
@ -1106,7 +1106,7 @@ x11_acquire_next_image_poll_x11(struct x11_swapchain *chain,
|
|||
if (timeout == UINT64_MAX) {
|
||||
event = xcb_wait_for_special_event(chain->conn, chain->special_event);
|
||||
if (!event)
|
||||
return x11_swapchain_result(chain, VK_ERROR_OUT_OF_DATE_KHR);
|
||||
return x11_swapchain_result(chain, VK_ERROR_SURFACE_LOST_KHR);
|
||||
} else {
|
||||
event = xcb_poll_for_special_event(chain->conn, chain->special_event);
|
||||
if (!event) {
|
||||
|
|
@ -1465,7 +1465,7 @@ x11_manage_fifo_queues(void *state)
|
|||
xcb_generic_event_t *event =
|
||||
xcb_wait_for_special_event(chain->conn, chain->special_event);
|
||||
if (!event) {
|
||||
result = VK_ERROR_OUT_OF_DATE_KHR;
|
||||
result = VK_ERROR_SURFACE_LOST_KHR;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue