summaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi/wsi_common_x11.c
diff options
context:
space:
mode:
authorDaniel Stone <[email protected]>2018-03-19 15:03:22 +0000
committerDaniel Stone <[email protected]>2018-03-20 08:52:59 +0000
commit478fc2d2a1a392108f48a3ed9aa21b10be72b4a2 (patch)
tree1d4a23a66bd2897ce6b98783c26ab1b7ab0faec8 /src/vulkan/wsi/wsi_common_x11.c
parent9a243eccae618e85aa7af762a4c40ecd8a2e4882 (diff)
dri3: Don't fail on version mismatch
The previous commit to make DRI3 modifier support optional, breaks with an updated server and old client. Make sure we never set multibuffers_available unless we also support it locally. Make sure we don't call stubs of new-DRI3 functions (or empty branches) which will never succeed. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: 7aeef2d4efdc ("dri3: allow building against older xcb (v3)")
Diffstat (limited to 'src/vulkan/wsi/wsi_common_x11.c')
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 71d62cb4cb7..3a00caddfb9 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -168,6 +168,7 @@ wsi_x11_connection_create(const VkAllocationCallbacks *alloc,
}
wsi_conn->has_dri3 = dri3_reply->present != 0;
+#ifdef HAVE_DRI3_MODIFIERS
if (wsi_conn->has_dri3) {
xcb_dri3_query_version_cookie_t ver_cookie;
xcb_dri3_query_version_reply_t *ver_reply;
@@ -178,8 +179,10 @@ wsi_x11_connection_create(const VkAllocationCallbacks *alloc,
(ver_reply->major_version > 1 || ver_reply->minor_version >= 2);
free(ver_reply);
}
+#endif
wsi_conn->has_present = pres_reply->present != 0;
+#ifdef HAVE_DRI3_MODIFIERS
if (wsi_conn->has_present) {
xcb_present_query_version_cookie_t ver_cookie;
xcb_present_query_version_reply_t *ver_reply;
@@ -190,6 +193,7 @@ wsi_x11_connection_create(const VkAllocationCallbacks *alloc,
(ver_reply->major_version > 1 || ver_reply->minor_version >= 2);
free(ver_reply);
}
+#endif
wsi_conn->has_dri3_modifiers = has_dri3_v1_2 && has_present_v1_2;
wsi_conn->is_proprietary_x11 = false;