Enable libGL to be built with DRI_NEW_INTERFACE_ONLY (but don't do it yet).
This commit is contained in:
parent
ccaa15a081
commit
1074eae704
|
@ -39,10 +39,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#define NEED_REPLIES
|
#define NEED_REPLIES
|
||||||
#include <X11/Xlibint.h>
|
#include <X11/Xlibint.h>
|
||||||
#include "xf86dristr.h"
|
|
||||||
#include <X11/extensions/Xext.h>
|
#include <X11/extensions/Xext.h>
|
||||||
#include "extutil.h"
|
#include "extutil.h"
|
||||||
#include "glheader.h"
|
#include "glheader.h"
|
||||||
|
#include "xf86dristr.h"
|
||||||
|
|
||||||
static XExtensionInfo _xf86dri_info_data;
|
static XExtensionInfo _xf86dri_info_data;
|
||||||
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
|
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
|
||||||
|
|
|
@ -72,6 +72,7 @@ static void * DriverCreateContextWrapper( const __GLXscreenConfigs *psc,
|
||||||
Display *dpy, XVisualInfo *vis, void *shared, __DRIcontext *ctx,
|
Display *dpy, XVisualInfo *vis, void *shared, __DRIcontext *ctx,
|
||||||
const __GLcontextModes *fbconfig, int render_type );
|
const __GLcontextModes *fbconfig, int render_type );
|
||||||
|
|
||||||
|
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||||
static Bool dummyBindContext2( Display *dpy, int scrn,
|
static Bool dummyBindContext2( Display *dpy, int scrn,
|
||||||
GLXDrawable draw, GLXDrawable read, GLXContext gc );
|
GLXDrawable draw, GLXDrawable read, GLXContext gc );
|
||||||
|
|
||||||
|
@ -113,6 +114,7 @@ static Bool dummyUnbindContext2( Display *dpy, int scrn,
|
||||||
assert( draw == read );
|
assert( draw == read );
|
||||||
return (*gc->driContext.unbindContext)( dpy, scrn, draw, gc, GL_FALSE );
|
return (*gc->driContext.unbindContext)( dpy, scrn, draw, gc, GL_FALSE );
|
||||||
}
|
}
|
||||||
|
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
@ -154,6 +156,7 @@ static void * DriverCreateContextWrapper( const __GLXscreenConfigs *psc,
|
||||||
assert( (ctx_priv == NULL) || (ctx->bindContext2 != NULL)
|
assert( (ctx_priv == NULL) || (ctx->bindContext2 != NULL)
|
||||||
|| (ctx->bindContext3 != NULL) );
|
|| (ctx->bindContext3 != NULL) );
|
||||||
}
|
}
|
||||||
|
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||||
else {
|
else {
|
||||||
if ( vis != NULL ) {
|
if ( vis != NULL ) {
|
||||||
ctx_priv = (*psc->driScreen.createContext)(dpy, vis, shared, ctx);
|
ctx_priv = (*psc->driScreen.createContext)(dpy, vis, shared, ctx);
|
||||||
|
@ -169,6 +172,7 @@ static void * DriverCreateContextWrapper( const __GLXscreenConfigs *psc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return ctx_priv;
|
return ctx_priv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1523,13 +1523,14 @@ static Bool BindContextWrapper( Display *dpy, GLXContext gc,
|
||||||
return (*gc->driContext.bindContext3)(dpy, gc->screen, draw, read,
|
return (*gc->driContext.bindContext3)(dpy, gc->screen, draw, read,
|
||||||
& gc->driContext);
|
& gc->driContext);
|
||||||
}
|
}
|
||||||
|
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||||
else {
|
else {
|
||||||
return (*gc->driContext.bindContext2)(dpy, gc->screen, draw, read,
|
return (*gc->driContext.bindContext2)(dpy, gc->screen, draw, read,
|
||||||
gc);
|
gc);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return GL_FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1542,14 +1543,15 @@ static Bool UnbindContextWrapper( Display *dpy, GLXContext gc )
|
||||||
gc->currentReadable,
|
gc->currentReadable,
|
||||||
& gc->driContext );
|
& gc->driContext );
|
||||||
}
|
}
|
||||||
|
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||||
else {
|
else {
|
||||||
return (*gc->driContext.unbindContext2)(dpy, gc->screen,
|
return (*gc->driContext.unbindContext2)(dpy, gc->screen,
|
||||||
gc->currentDrawable,
|
gc->currentDrawable,
|
||||||
gc->currentReadable, gc);
|
gc->currentReadable, gc);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return GL_FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue