Enable libGL to be built with DRI_NEW_INTERFACE_ONLY (but don't do it yet).
diff --git a/src/glx/x11/XF86dri.c b/src/glx/x11/XF86dri.c
index b94fd97..d0b7f72 100644
--- a/src/glx/x11/XF86dri.c
+++ b/src/glx/x11/XF86dri.c
@@ -39,10 +39,10 @@
#define NEED_REPLIES
#include <X11/Xlibint.h>
-#include "xf86dristr.h"
#include <X11/extensions/Xext.h>
#include "extutil.h"
#include "glheader.h"
+#include "xf86dristr.h"
static XExtensionInfo _xf86dri_info_data;
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index ba3bf75..c76502c 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -72,6 +72,7 @@
Display *dpy, XVisualInfo *vis, void *shared, __DRIcontext *ctx,
const __GLcontextModes *fbconfig, int render_type );
+#ifndef DRI_NEW_INTERFACE_ONLY
static Bool dummyBindContext2( Display *dpy, int scrn,
GLXDrawable draw, GLXDrawable read, GLXContext gc );
@@ -113,6 +114,7 @@
assert( draw == read );
return (*gc->driContext.unbindContext)( dpy, scrn, draw, gc, GL_FALSE );
}
+#endif /* DRI_NEW_INTERFACE_ONLY */
/****************************************************************************/
@@ -154,6 +156,7 @@
assert( (ctx_priv == NULL) || (ctx->bindContext2 != NULL)
|| (ctx->bindContext3 != NULL) );
}
+#ifndef DRI_NEW_INTERFACE_ONLY
else {
if ( vis != NULL ) {
ctx_priv = (*psc->driScreen.createContext)(dpy, vis, shared, ctx);
@@ -169,6 +172,7 @@
}
}
}
+#endif
return ctx_priv;
}
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 1155cd9..397b390 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -1523,13 +1523,14 @@
return (*gc->driContext.bindContext3)(dpy, gc->screen, draw, read,
& gc->driContext);
}
+#ifndef DRI_NEW_INTERFACE_ONLY
else {
return (*gc->driContext.bindContext2)(dpy, gc->screen, draw, read,
gc);
}
-#else
- return GL_FALSE;
#endif
+#endif
+ return GL_FALSE;
}
@@ -1542,14 +1543,15 @@
gc->currentReadable,
& gc->driContext );
}
+#ifndef DRI_NEW_INTERFACE_ONLY
else {
return (*gc->driContext.unbindContext2)(dpy, gc->screen,
gc->currentDrawable,
gc->currentReadable, gc);
}
-#else
- return GL_FALSE;
#endif
+#endif
+ return GL_FALSE;
}