From f0f202e6b764be803470e27cba9102f14361ae22 Mon Sep 17 00:00:00 2001 From: Armin K Date: Sat, 9 Nov 2013 00:06:45 +0100 Subject: glx: conditionaly build dri3 and present loader (v3) This patch makes it possible to disable DRI3 if desired. Tested with: ./configure --disable-dri3 --with-dri-drivers=i965 \ --with-gallium-drivers= --disable-vdpau --disable-egl \ --disable-gbm --disable-xvmc Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71397 Cc: 10.0 --- src/glx/Makefile.am | 8 ++++++-- src/glx/glxext.c | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/glx') diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index ae296b92236..0aec2aa3daa 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -94,10 +94,14 @@ libglx_la_SOURCES = \ dri2_glx.c \ dri2.c \ dri2_query_renderer.c \ - dri3_glx.c \ - dri3_common.c \ applegl_glx.c +if HAVE_DRI3 +libglx_la_SOURCES += \ + dri3_glx.c \ + dri3_common.c +endif + GL_LIBS = \ libglx.la \ $(SHARED_GLAPI_LIBS) \ diff --git a/src/glx/glxext.c b/src/glx/glxext.c index c6e4d9f5738..2711e57b793 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -770,8 +770,10 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv) for (i = 0; i < screens; i++, psc++) { psc = NULL; #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) +#if defined(HAVE_DRI3) if (priv->dri3Display) psc = (*priv->dri3Display->createScreen) (i, priv); +#endif if (psc == NULL && priv->dri2Display) psc = (*priv->dri2Display->createScreen) (i, priv); if (psc == NULL && priv->driDisplay) @@ -865,8 +867,10 @@ __glXInitialize(Display * dpy) ** (e.g., those called in AllocAndFetchScreenConfigs). */ if (glx_direct && glx_accel) { +#if defined(HAVE_DRI3) if (!getenv("LIBGL_DRI3_DISABLE")) dpyPriv->dri3Display = dri3_create_display(dpy); +#endif dpyPriv->dri2Display = dri2CreateDisplay(dpy); dpyPriv->driDisplay = driCreateDisplay(dpy); } -- cgit v1.2.3