vulkan: Disable randr lease for libxcb < 1.13
authorMaxime <berillions@gmail.com>
Sun, 23 Sep 2018 22:46:22 +0000 (08:46 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 27 Sep 2018 06:31:42 +0000 (16:31 +1000)
Since the Randr lease code was added, compiling against libxcb 1.12 no
longer works.

CC: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108024
Fixes: 7ab1fffcd2a504024b16e408de329f7a94553ecc
Tested-By: Maxime <berillions@gmail.com>
Fixes: 7ab1fffcd2a504024b16 "vulkan: Add EXT_acquire_xlib_display [v5]"
src/vulkan/wsi/wsi_common_display.c

index 1dbed08d8a750ce21846f09e552c69f04d09ac25..5cebde5b9bc1d28a961117bddcfb047c3ea0134f 100644 (file)
@@ -2308,6 +2308,7 @@ wsi_acquire_xlib_display(VkPhysicalDevice physical_device,
    if (!crtc)
       return VK_ERROR_INITIALIZATION_FAILED;
 
+#ifdef HAVE_DRI3_MODIFIERS
    xcb_randr_lease_t lease = xcb_generate_id(connection);
    xcb_randr_create_lease_cookie_t cl_c =
       xcb_randr_create_lease(connection, root, lease, 1, 1,
@@ -2328,6 +2329,7 @@ wsi_acquire_xlib_display(VkPhysicalDevice physical_device,
       return VK_ERROR_INITIALIZATION_FAILED;
 
    wsi->fd = fd;
+#endif
 
    return VK_SUCCESS;
 }