[Mesa-dev] [PATCH] dri3: allow building against older xcb (v3)
Dylan Baker
dylan at pnwbakers.com
Tue Mar 13 20:48:23 UTC 2018
Quoting Dave Airlie (2018-03-13 13:06:00)
> From: Dave Airlie <airlied at redhat.com>
>
> I'm not sure everyone wants to be updating their dri3 in a forced
> march setting, this allows a nicer approach, esp when you want
> to build on distro that aren't brand new.
>
> I'm sure there are plenty of ways this patch could be cleaner,
> and I've also not built it against an updated dri3.
>
> For meson I've just left it alone, since if you are using meson
> you probably don't mind xcb updates, and if you are using meson
> you can fix this better than me.
>
> v3: just don't put a version in for dri3/present without
> modifiers, should allow building with 1.11 as well
>
> (feel free to supply meson followups)
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> configure.ac | 12 +++++++++---
> meson.build | 2 +-
> src/egl/drivers/dri2/platform_x11_dri3.c | 4 ++++
> src/loader/loader_dri3_helper.c | 22 ++++++++++++++++------
> src/loader/loader_dri3_helper.h | 3 ++-
> src/vulkan/wsi/wsi_common_x11.c | 12 ++++++++++--
> 6 files changed, 42 insertions(+), 13 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 1553ce99da..dcf3f924ee 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -92,9 +92,9 @@ WAYLAND_REQUIRED=1.11
> WAYLAND_PROTOCOLS_REQUIRED=1.8
> XCB_REQUIRED=1.9.3
> XCBDRI2_REQUIRED=1.8
> -XCBDRI3_REQUIRED=1.13
> +XCBDRI3_MODIFIERS_REQUIRED=1.13
> XCBGLX_REQUIRED=1.8.1
> -XCBPRESENT_REQUIRED=1.13
> +XCBPRESENT_MODIFIERS_REQUIRED=1.13
> XDAMAGE_REQUIRED=1.1
> XSHMFENCE_REQUIRED=1.1
> XVMC_REQUIRED=1.0.6
> @@ -1851,8 +1851,14 @@ fi
> if test x"$enable_dri3" = xyes; then
> DEFINES="$DEFINES -DHAVE_DRI3"
>
> - dri3_modules="x11-xcb xcb >= $XCB_REQUIRED xcb-dri3 >= $XCBDRI3_REQUIRED xcb-xfixes xcb-present >= $XCBPRESENT_REQUIRED xcb-sync xshmfence >= $XSHMFENCE_REQUIRED"
> + dri3_modules="x11-xcb xcb >= $XCB_REQUIRED xcb-dri3 xcb-xfixes xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED"
> PKG_CHECK_MODULES([XCB_DRI3], [$dri3_modules])
> + dri3_modifier_modules="xcb-dri3 >= $XCBDRI3_MODIFIERS_REQUIRED xcb-present >= $XCBPRESENT_MODIFIERS_REQUIRES"
> + PKG_CHECK_MODULES([XCB_DRI3_MODIFIERS], [$dri3_modifier_modules], [have_dri3_modifiers=yes], [have_dri3_modifiers=no])
> +
> + if test "x$have_dri3_modifiers" == xyes; then
> + DEFINES="$DEFINES -DHAVE_DRI3_MODIFIERS"
> + fi
> fi
>
> AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11')
> diff --git a/meson.build b/meson.build
> index 3c63f38438..0012815254 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1235,7 +1235,7 @@ if with_platform_x11
> dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
>
> if with_dri3
> - pre_args += '-DHAVE_DRI3'
> + pre_args += '-DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS'
That should be `pre_args += ['-DHAVE_DRI3', '-DHAVE_DRI3_MODFIERS']`
I don't personally care about libxcb < 1.13, so this approach is fine with me. I
don't the that the version of meson that ships with any of the LTS/EL type
releases this matters for will build mesa anyway.
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180313/19b293a2/attachment-0001.sig>
More information about the mesa-dev
mailing list