[Mesa-dev] [PATCH] configure.ac: Check for xcb-randr version and xrandr to enable leasing

Lionel Landwerlin lionel.g.landwerlin at intel.com
Fri Jul 6 19:30:04 UTC 2018


Hi Danylo,

I just run into the same issue, thanks for fixing this with autotools.
I think the same issue remains with meson though.

Thanks,

-
Lionel

On 20/06/18 14:25, Danylo Piliaiev wrote:
> VK_USE_PLATFORM_XLIB_XRANDR_EXT requires xlib leasing which requires
> xcb-randr >= 1.13. Also xrandr header is required for this extension.
> The extension should not be automatically enabled if these dependencies
> aren't satisfied.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106976
>
> Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
> ---
>   configure.ac | 23 ++++++++++-------------
>   1 file changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 0652410..ab59e06 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -97,6 +97,7 @@ XCBDRI2_REQUIRED=1.8
>   XCBDRI3_MODIFIERS_REQUIRED=1.13
>   XCBGLX_REQUIRED=1.8.1
>   XCBPRESENT_MODIFIERS_REQUIRED=1.13
> +XCBRANDR_XLEASE_REQUIRED=1.13
>   XDAMAGE_REQUIRED=1.1
>   XSHMFENCE_REQUIRED=1.1
>   XVMC_REQUIRED=1.0.6
> @@ -1867,18 +1868,6 @@ if test x"$enable_dri3" = xyes; then
>       fi
>   fi
>   
> -
> -if echo "$platforms" | grep -q 'x11' && echo "$platforms" | grep -q 'drm'; then
> -    have_xlease=yes
> -else
> -    have_xlease=no
> -fi
> -
> -if test x"$have_xlease" = xyes; then
> -    randr_modules="x11-xcb xcb-randr"
> -    PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules])
> -fi
> -
>   AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11')
>   AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, echo "$platforms" | grep -q 'wayland')
>   AM_CONDITIONAL(HAVE_PLATFORM_DRM, echo "$platforms" | grep -q 'drm')
> @@ -1896,12 +1885,20 @@ xno)
>       ;;
>   *)
>       if echo "$platforms" | grep -q 'x11' && echo "$platforms" | grep -q 'drm'; then
> -        enable_xlib_lease=yes
> +        xlease_modules="x11-xcb xcb-randr >= $XCBRANDR_XLEASE_REQUIRED xrandr"
> +        PKG_CHECK_EXISTS([$xlease_modules], [enable_xlib_lease=yes], [enable_xlib_lease=no])
>       else
>           enable_xlib_lease=no
>       fi
>   esac
>   
> +if test x"$enable_xlib_lease" = xyes; then
> +    randr_modules="x11-xcb xcb-randr >= $XCBRANDR_XLEASE_REQUIRED"
> +    PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules])
> +    xlib_randr_modules="xrandr"
> +    PKG_CHECK_MODULES([XLIB_RANDR], [$xlib_randr_modules])
> +fi
> +
>   AM_CONDITIONAL(HAVE_XLIB_LEASE, test "x$enable_xlib_lease" = xyes)
>   
>   dnl




More information about the mesa-dev mailing list