diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/Makefile.am | 8 | ||||
-rw-r--r-- | src/glx/glxext.c | 4 |
2 files changed, 10 insertions, 2 deletions
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); } |