[Mesa-dev] [PATCH] vulkan: Disable randr lease for libxcb < 1.13

Stuart Young cefiar at gmail.com
Thu Sep 27 05:40:09 UTC 2018


Hi All,

Can we get some feedback on this patch please?

At the moment, we can't compile vulkan using libxcb < 1.13 due to the use
of the RandR lease mechanism. Dave Airlie (cc'd) did some work previously
to allow things to be compiled with libxcb 1.11/1.12, mainly by ifdef'ing
certain code with HAVE_DRI3_MODIFIERS so that it would compile, but without
the extra features that xcb 1.13+ provides. See commit 7aeef2d4efdc809a698e
"dri3: allow building against older xcb (v3)" for that.

The patch (originally provided by Maxime) appears to solve the new build
issue, and in much the same way as Dave Airlie did with his previous patch.

Note: If we "must have" xcb 1.13, then that's fine. But if that is the
case, then we need to update mesa's build deps so that this is explicit
(ie: effectively reverting Dave Airlie's commits on the issue).


On Tue, 25 Sep 2018 at 02:04, Eric Engestrom <eric.engestrom at intel.com>
wrote:

> +Cc Keith, Jason & Daniel, who know this code best.
>
> On Monday, 2018-09-24 08:46:22 +1000, Stuart Young wrote:
> > From: Maxime <berillions at gmail.com>
> >
> > Since the Randr lease code was added, compiling against libxcb 1.12 no
> > longer works.
> >
> > CC: mesa-stable at lists.freedesktop.org
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108024
> > Fixes: 7ab1fffcd2a504024b16e408de329f7a94553ecc
>
> Thanks for the `Fixes:` tag, it's really useful :)
> We usually also add the commit title as well, to help humans know what it's
> about without having to look it up (makes no difference to scripts though):
> Fixes: 7ab1fffcd2a504024b16 "vulkan: Add EXT_acquire_xlib_display [v5]"
>
> > Tested-By: Maxime <berillions at gmail.com>
> >
> > ---
> >  src/vulkan/wsi/wsi_common_display.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/src/vulkan/wsi/wsi_common_display.c
> b/src/vulkan/wsi/wsi_common_display.c
> > index e99b0465ec..e23d2983c9 100644
> > --- a/src/vulkan/wsi/wsi_common_display.c
> > +++ b/src/vulkan/wsi/wsi_common_display.c
> > @@ -2304,6 +2304,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,
> > @@ -2324,6 +2325,7 @@ wsi_acquire_xlib_display(VkPhysicalDevice
> physical_device,
> >        return VK_ERROR_INITIALIZATION_FAILED;
> >
> >     wsi->fd = fd;
> > +#endif
> >
> >     return VK_SUCCESS;
> >  }
> > --
> > 2.11.0
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


-- 
Stuart Young (aka Cefiar)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180927/cd905a12/attachment-0001.html>


More information about the mesa-dev mailing list