vulkan/wsi/x11: Set OUT_OF_DATE if wait_for_special_event fails
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 21 Feb 2018 20:38:12 +0000 (12:38 -0800)
committerDaniel Stone <daniels@collabora.com>
Wed, 21 Feb 2018 22:37:10 +0000 (22:37 +0000)
This most likely means we lost our connection to the X server so
OUT_OF_DATE is reasonable.  This was also the one case where we pushed a
UINT32_MAX into the queue without setting an error condition.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/vulkan/wsi/wsi_common_x11.c

index 2cc7a67c63febe065e9257fb2fc2c4f5ee0cc92e..15d291463e9012b637792d854971d4dc0088b153 100644 (file)
@@ -899,8 +899,10 @@ x11_manage_fifo_queues(void *state)
       while (chain->last_present_msc < target_msc) {
          xcb_generic_event_t *event =
             xcb_wait_for_special_event(chain->conn, chain->special_event);
-         if (!event)
+         if (!event) {
+            result = VK_ERROR_OUT_OF_DATE_KHR;
             goto fail;
+         }
 
          result = x11_handle_dri3_present_event(chain, (void *)event);
          free(event);