summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-02-21 12:38:12 -0800
committerEmil Velikov <[email protected]>2018-03-20 16:57:22 +0000
commitdd8e9517ef03695b4dcfaf063b5d7558c845bd8d (patch)
tree92ba738f88741103c63c2669781af5136420ce7c
parent72796340e4699c0cdc11707de5a73833a4714ed9 (diff)
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: [email protected] Reviewed-by: Daniel Stone <[email protected]> (cherry picked from commit 6937c613242d646b8c37f01ffd6a02a9b64c8d6c)
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index c29e0a2d30d..e5d7e4d1742 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);