Mesa (master): vulkan/wsi/x11: Set OUT_OF_DATE if wait_for_special_event fails

Daniel Stone daniels at kemper.freedesktop.org
Wed Feb 21 22:37:23 UTC 2018


Module: Mesa
Branch: master
Commit: 6937c613242d646b8c37f01ffd6a02a9b64c8d6c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6937c613242d646b8c37f01ffd6a02a9b64c8d6c

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Wed Feb 21 12:38:12 2018 -0800

vulkan/wsi/x11: Set OUT_OF_DATE if wait_for_special_event fails

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 at lists.freedesktop.org
Reviewed-by: Daniel Stone <daniels at collabora.com>

---

 src/vulkan/wsi/wsi_common_x11.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 2cc7a67c63..15d291463e 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -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);




More information about the mesa-commit mailing list