wsi/x11: xcb_wait_for_special_event failure is an error
authorAdam Jackson <ajax@redhat.com>
Thu, 24 Mar 2022 14:49:16 +0000 (10:49 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 25 Mar 2022 19:31:13 +0000 (19:31 +0000)
commit8006179cfdc15d6b012b25c5685a04fafe464459
tree8d3c21f594e9c533c2bcc11971d459b3bed9831e
parentf31208f778c21b308aa5bb3f9b48915c0718b858
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>
src/vulkan/wsi/wsi_common_x11.c