summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-05-12 23:08:26 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-05-21 13:35:31 +0100
commitcf8caff1943287f1e9e93b2974f495e62cc7b130 (patch)
tree15cb58c5ec47236c77c0aa3bc6913eee8f11d725
parentebe5c1675791935849a98e315d8a5a113463133c (diff)
Fix build in dri_platform=none, --enable-driglx-direct case (i.e. swrast only)darwin-build-fixes-for-review
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 <jon.turney@dronecode.org.uk>
-rw-r--r--configure.ac1
-rw-r--r--src/glx/glxcmds.c2
-rw-r--r--src/glx/glxext.c2
3 files changed, 4 insertions, 1 deletions
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