From cf8caff1943287f1e9e93b2974f495e62cc7b130 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Mon, 12 May 2014 23:08:26 +0100 Subject: Fix build in dri_platform=none, --enable-driglx-direct case (i.e. swrast only) Untangling to fix build in dri_platform=none, --enable-driglx-direct case. Turn some tests from !GLX_USE_APPLEGL into a positive form, so DRI1/2/3 renderers and the glXGetScreenDriver()/glXGetScreenDriver() interface used by xdriinfo are only used when dri_platform=drm Signed-off-by: Jon TURNEY --- configure.ac | 1 + src/glx/glxcmds.c | 2 +- src/glx/glxext.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fbee627b4f..28060f48b7 100644 --- a/configure.ac +++ b/configure.ac @@ -932,6 +932,7 @@ xyesno) if test x"$driglx_direct" = xyes; then if test x"$dri_platform" = xdrm ; then + DEFINES="$DEFINES -DGLX_USE_DRM" if test "x$have_libdrm" != xyes; then AC_MSG_ERROR([Direct rendering requires libdrm >= $LIBDRM_REQUIRED]) fi diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index c8de792761..04d8db1609 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -2581,7 +2581,7 @@ static const struct name_address_pair GLX_functions[] = { GLX_FUNCTION2(glXReleaseTexImageEXT, __glXReleaseTexImageEXT), #endif -#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) +#if defined(GLX_DIRECT_RENDERING) && defined(GLX_USE_DRM) /*** DRI configuration ***/ GLX_FUNCTION(glXGetScreenDriver), GLX_FUNCTION(glXGetDriverConfig), diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 24c80d4f31..bab116cbc5 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -869,6 +869,7 @@ __glXInitialize(Display * dpy) ** Note: This _must_ be done before calling any other DRI routines ** (e.g., those called in AllocAndFetchScreenConfigs). */ +#if defined(GLX_USE_DRM) if (glx_direct && glx_accel) { #if defined(HAVE_DRI3) if (!getenv("LIBGL_DRI3_DISABLE")) @@ -877,6 +878,7 @@ __glXInitialize(Display * dpy) dpyPriv->dri2Display = dri2CreateDisplay(dpy); dpyPriv->driDisplay = driCreateDisplay(dpy); } +#endif if (glx_direct) dpyPriv->driswDisplay = driswCreateDisplay(dpy); #endif -- cgit v1.2.3