Commit 21a4a851 authored by idr's avatar idr
Browse files

Merged driinterface-0-0-3

parent bc3c2ce1
......@@ -204,6 +204,12 @@ extern "C" {
#define GLX_SLOW_VISUAL_EXT 0x8001
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
/* Property values for swap method (GLX_OML_swap_method) */
#define GLX_SWAP_METHOD_OML 0x8060
#define GLX_SWAP_EXCHANGE_OML 0x8061
#define GLX_SWAP_COPY_OML 0x8062
#define GLX_SWAP_UNDEFINED_OML 0x8063
/*
** Names for attributes to glXGetClientString.
*/
......
......@@ -75,20 +75,20 @@ XCOMM nothing
#define MesaDrvGammaBuildDir $(GLXLIBSRC)/mesa/drivers/dri/gamma/
#include "../mesa/drivers/dri/gamma/Imakefile.inc"
DRVOBJS = $(GAMMAOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(GAMMAUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(GAMMADOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(GAMMAPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(GAMMAOBJS) $(MESAOBJS)
DRVUOBJS = $(GAMMAUOBJS) $(MESAUOBJS)
DRVDOBJS = $(GAMMADOBJS) $(MESADOBJS)
DRVPOBJS = $(GAMMAPOBJS) $(MESAPOBJS)
#elif GlxBuiltInTdfx
#define MesaDrvTdfxBuildDir $(GLXLIBSRC)/mesa/drivers/dri/tdfx/
#include "../mesa/drivers/dri/tdfx/Imakefile.inc"
DRVOBJS = $(TDFXOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(TDFXUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(TDFXDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(TDFXPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(TDFXOBJS) $(MESAOBJS)
DRVUOBJS = $(TDFXUOBJS) $(MESAUOBJS)
DRVDOBJS = $(TDFXDOBJS) $(MESADOBJS)
DRVPOBJS = $(TDFXPOBJS) $(MESAPOBJS)
OTHERREQUIREDLIBS = -lglide3 -ldl
......@@ -97,69 +97,69 @@ OTHERREQUIREDLIBS = -lglide3 -ldl
#define MesaDrvI810BuildDir $(GLXLIBSRC)/mesa/drivers/dri/i810/
#include "../mesa/drivers/dri/i810/Imakefile.inc"
DRVOBJS = $(I810OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(I810UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(I810DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(I810POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(I810OBJS) $(COMMONOBJS) $(MESAOBJS)
DRVUOBJS = $(I810UOBJS) $(COMMONUOBJS) $(MESAUOBJS)
DRVDOBJS = $(I810DOBJS) $(COMMONDOBJS) $(MESADOBJS)
DRVPOBJS = $(I810POBJS) $(COMMONPOBJS) $(MESAPOBJS)
#elif GlxBuiltInI830
#define MesaDrvI830BuildDir $(GLXLIBSRC)/mesa/drivers/dri/i830/
#include "../mesa/drivers/dri/i830/Imakefile.inc"
DRVOBJS = $(I830OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(I830UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(I830DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(I830POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(I830OBJS) $(COMMONOBJS) $(MESAOBJS)
DRVUOBJS = $(I830UOBJS) $(COMMONUOBJS) $(MESAUOBJS)
DRVDOBJS = $(I830DOBJS) $(COMMONDOBJS) $(MESADOBJS)
DRVPOBJS = $(I830POBJS) $(COMMONPOBJS) $(MESAPOBJS)
#elif GlxBuiltInMga
#define MesaDrvMgaBuildDir $(GLXLIBSRC)/mesa/drivers/dri/mga/
#include "../mesa/drivers/dri/mga/Imakefile.inc"
DRVOBJS = $(MGAOBJS) $(COMMONOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(MGAUOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(MGADOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(MGAPOBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(MGAOBJS) $(COMMONOBJS) $(MESAOBJS)
DRVUOBJS = $(MGAUOBJS) $(COMMONUOBJS) $(MESAUOBJS)
DRVDOBJS = $(MGADOBJS) $(COMMONDOBJS) $(MESADOBJS)
DRVPOBJS = $(MGAPOBJS) $(COMMONPOBJS) $(MESAPOBJS)
#elif GlxBuiltInR128
#define MesaDrvR128BuildDir $(GLXLIBSRC)/mesa/drivers/dri/r128/
#include "../mesa/drivers/dri/r128/Imakefile.inc"
DRVOBJS = $(R128OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(R128UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(R128DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(R128POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(R128OBJS) $(COMMONOBJS) $(MESAOBJS)
DRVUOBJS = $(R128UOBJS) $(COMMONUOBJS) $(MESAUOBJS)
DRVDOBJS = $(R128DOBJS) $(COMMONDOBJS) $(MESADOBJS)
DRVPOBJS = $(R128POBJS) $(COMMONPOBJS) $(MESAPOBJS)
#elif GlxBuiltInRadeon
#define MesaDrvRadeonBuildDir $(GLXLIBSRC)/mesa/drivers/dri/radeon/
#include "../mesa/drivers/dri/radeon/Imakefile.inc"
DRVOBJS = $(RADEONOBJS) $(COMMONOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(RADEONUOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(RADEONDOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(RADEONPOBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(RADEONOBJS) $(COMMONOBJS) $(MESAOBJS)
DRVUOBJS = $(RADEONUOBJS) $(COMMONUOBJS) $(MESAUOBJS)
DRVDOBJS = $(RADEONDOBJS) $(COMMONDOBJS) $(MESADOBJS)
DRVPOBJS = $(RADEONPOBJS) $(COMMONPOBJS) $(MESAPOBJS)
#elif GlxBuiltInFfb
#define MesaDrvFfbBuildDir $(GLXLIBSRC)/mesa/drivers/dri/ffb/
#include "../mesa/drivers/dri/ffb/Imakefile.inc"
DRVOBJS = $(FFBOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(FFBUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(FFBDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(FFBPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(FFBOBJS) $(MESAOBJS)
DRVUOBJS = $(FFBUOBJS) $(MESAUOBJS)
DRVDOBJS = $(FFBDOBJS) $(MESADOBJS)
DRVPOBJS = $(FFBPOBJS) $(MESAPOBJS)
#elif GlxBuiltInSIS
#define MesaDrvSisBuildDir $(GLXLIBSRC)/mesa/drivers/dri/sis/
#include "../mesa/drivers/dri/sis/Imakefile.inc"
DRVOBJS = $(SISOBJS) $(MESAOBJS) $(DRMOBJS)
DRVUOBJS = $(SISUOBJS) $(MESAUOBJS) $(DRMUOBJS)
DRVDOBJS = $(SISDOBJS) $(MESADOBJS) $(DRMDOBJS)
DRVPOBJS = $(SISPOBJS) $(MESAPOBJS) $(DRMPOBJS)
DRVOBJS = $(SISOBJS) $(MESAOBJS)
DRVUOBJS = $(SISUOBJS) $(MESAUOBJS)
DRVDOBJS = $(SISDOBJS) $(MESADOBJS)
DRVPOBJS = $(SISPOBJS) $(MESAPOBJS)
#elif GlxBuiltInXMesa
......@@ -197,14 +197,14 @@ OTHERREQUIREDLIBS = \
REQUIREDLIBS = $(BASEREQUIREDLIBS) $(OTHERREQUIREDLIBS) -lXxf86vm
OBJS = $(GLXOBJS) $(DRIOBJS) $(DRVOBJS)
OBJS = $(GLXOBJS) $(DRIOBJS) $(DRVOBJS) $(DRMOBJS)
#if HasSharedLibraries && !SharedLibGlxWithoutPIC
UOBJS = $(GLXUOBJS) $(DRIUOBJS) $(DRVUOBJS)
UOBJS = $(GLXUOBJS) $(DRIUOBJS) $(DRVUOBJS) $(DRMUOBJS)
#else
UOBJS = $(OBJS)
#endif
DOBJS = $(GLXDOBJS) $(DRIDOBJS) $(DRVDOBJS)
POBJS = $(GLXPOBJS) $(DRIPOBJS) $(DRVPOBJS)
DOBJS = $(GLXDOBJS) $(DRIDOBJS) $(DRVDOBJS) $(DRMDOBJS)
POBJS = $(GLXPOBJS) $(DRIPOBJS) $(DRVPOBJS) $(DRMPOBJS)
#if LocalThreads
#if NeedUIThrStubs
......
......@@ -324,10 +324,10 @@ Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion,
return True;
}
Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context, hHWContext)
Display* dpy;
int screen;
Visual* visual;
int configID;
XID* context;
drmContextPtr hHWContext;
{
......@@ -342,7 +342,7 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
GetReq(XF86DRICreateContext, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRICreateContext;
req->visual = visual->visualid;
req->visual = configID;
req->screen = screen;
*context = XAllocID(dpy);
req->context = *context;
......@@ -359,6 +359,17 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
return True;
}
Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
Display* dpy;
int screen;
Visual* visual;
XID* context;
drmContextPtr hHWContext;
{
return XF86DRICreateContextWithConfig( dpy, screen, visual->visualid,
context, hHWContext );
}
Bool XF86DRIDestroyContext(dpy, screen, context)
Display* dpy;
int screen;
......@@ -601,27 +612,12 @@ Bool XF86DRIOpenFullScreen(dpy, screen, drawable)
int screen;
Drawable drawable;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIOpenFullScreenReply rep;
xXF86DRIOpenFullScreenReq *req;
XF86DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIOpenFullScreen, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIOpenFullScreen;
req->screen = screen;
req->drawable = drawable;
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();
return False;
}
UnlockDisplay(dpy);
SyncHandle();
return rep.isFullScreen ? True : False;
/* This function and the underlying X protocol are deprecated.
*/
(void) dpy;
(void) screen;
(void) drawable;
return False;
}
Bool XF86DRICloseFullScreen(dpy, screen, drawable)
......@@ -629,29 +625,10 @@ Bool XF86DRICloseFullScreen(dpy, screen, drawable)
int screen;
Drawable drawable;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRICloseFullScreenReply rep;
xXF86DRICloseFullScreenReq *req;
XF86DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRICloseFullScreen, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRICloseFullScreen;
req->screen = screen;
req->drawable = drawable;
/* The reply doesn't contain any data --
we just use it as a synchronization
point. */
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();
return False;
}
UnlockDisplay(dpy);
SyncHandle();
/* This function and the underlying X protocol are deprecated.
*/
(void) dpy;
(void) screen;
(void) drawable;
return True;
}
......@@ -224,14 +224,19 @@ static __DRIdriver *OpenDriver(const char *driverName)
Xfree(driver);
return NULL; /* out of memory! */
}
driver->createScreenFunc = (CreateScreenFunc)
dlsym(handle, "__driCreateScreen");
if (!driver->createScreenFunc) {
driver->createNewScreenFunc = (CreateNewScreenFunc)
dlsym(handle, "__driCreateNewScreen");
if ( (driver->createScreenFunc == NULL)
&& (driver->createNewScreenFunc == NULL) ) {
/* If the driver doesn't have this symbol then something's
* really, really wrong.
*/
ErrorMessageF("__driCreateScreen() not defined in %s_dri.so!\n",
driverName);
ErrorMessageF("Neither __driCreateScreen or __driCreateNewScreen "
"are defined in %s_dri.so!\n", driverName);
Xfree(driver);
dlclose(handle);
continue;
......@@ -415,15 +420,24 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
/* allocate array of pointers to createScreen funcs */
pdisp->createScreen = (CreateScreenFunc *) Xmalloc(numScreens * sizeof(void *));
if (!pdisp->createScreen) {
XFree(pdpyp);
Xfree(pdpyp);
return NULL;
}
/* allocate array of pointers to createScreen funcs */
pdisp->createNewScreen = (CreateNewScreenFunc *) Xmalloc(numScreens * sizeof(void *));
if (!pdisp->createNewScreen) {
Xfree(pdisp->createScreen);
Xfree(pdpyp);
return NULL;
}
/* allocate array of library handles */
pdpyp->libraryHandles = (void **) Xmalloc(numScreens * sizeof(void*));
if (!pdpyp->libraryHandles) {
Xfree(pdisp->createNewScreen);
Xfree(pdisp->createScreen);
XFree(pdpyp);
Xfree(pdpyp);
return NULL;
}
......@@ -431,6 +445,7 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
/* we'll statically bind to the built-in __driCreateScreen function */
for (scrn = 0; scrn < numScreens; scrn++) {
pdisp->createScreen[scrn] = __driCreateScreen;
pdisp->createNewScreen[scrn] = NULL;
pdpyp->libraryHandles[scrn] = NULL;
}
......@@ -443,10 +458,12 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
__DRIdriver *driver = driGetDriver(dpy, scrn);
if (driver) {
pdisp->createScreen[scrn] = driver->createScreenFunc;
pdisp->createNewScreen[scrn] = driver->createNewScreenFunc;
pdpyp->libraryHandles[scrn] = driver->handle;
}
else {
pdisp->createScreen[scrn] = DummyCreateScreen;
pdisp->createNewScreen[scrn] = NULL;
pdpyp->libraryHandles[scrn] = NULL;
}
}
......
This diff is collapsed.
......@@ -167,28 +167,42 @@ struct __DriverAPIRec {
/**
* Full screen mode opening callback.
*
* \deprecated Full screen functionality is no longer used by DRI.
* Drivers should simply install a function returning
* \c GL_TRUE for backwards compatability.
* \deprecated
* Full screen functionality is no longer used by DRI. Drivers should
* simply install a function returning \c GL_TRUE for backwards
* compatability.
*
* \todo
* Nothing calls this function anymore. Since this data structure is only
* accessed with in the driver (i.e., libGL never sees it), we need to
* remove the other cases that set this field and remove the field.
*/
GLboolean (*OpenFullScreen)(__DRIcontextPrivate *driContextPriv);
/**
* Full screen mode closing callback.
*
* \deprecated Full screen functionality is no longer used by DRI.
* Drivers should simply install a function returning
* \c GL_TRUE for backwards compatability.
*
* \deprecated
* Full screen functionality is no longer used by DRI. Drivers should
* simply install a function returning \c GL_TRUE for backwards
* compatability.
*
* \todo
* Nothing calls this function anymore. Since this data structure is only
* accessed with in the driver (i.e., libGL never sees it), we need to
* remove the other cases that set this field and remove the field.
*/
GLboolean (*CloseFullScreen)(__DRIcontextPrivate *driContextPriv);
/* Retrieves statistics about buffer swap operations. Required if
/**
* Retrieves statistics about buffer swap operations. Required if
* GLX_OML_sync_control or GLX_MESA_swap_frame_usage is supported.
*/
int (*GetSwapInfo)( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );
/* Required if GLX_SGI_video_sync or GLX_OML_sync_control is
/**
* Required if GLX_SGI_video_sync or GLX_OML_sync_control is
* supported.
*/
int (*GetMSC)( __DRIscreenPrivate * priv, int64_t * count );
......@@ -215,13 +229,13 @@ struct __DRIswapInfoRec {
*/
uint64_t swap_count;
/*
/**
* Unadjusted system time of the last buffer swap. This is the time
* when the swap completed, not the time when swapBuffers was called.
*/
int64_t swap_ust;
/*
/**
* Number of swap operations that occurred after the swap deadline. That
* is if a swap happens more than swap_interval frames after the previous
* swap, it has missed its deadline. If swap_interval is 0, then the
......@@ -229,7 +243,7 @@ struct __DRIswapInfoRec {
*/
uint64_t swap_missed_count;
/*
/**
* Amount of time used by the last swap that missed its deadline. This
* is calculated as (__glXGetUST() - swap_ust) / (swap_interval *
* time_for_single_vrefresh)). If the actual value of swap_interval is
......@@ -240,6 +254,14 @@ struct __DRIswapInfoRec {
};
typedef Bool (GetDrawableInfo)( Display *dpy, int scrn, Drawable draw,
unsigned int * index, unsigned int * stamp,
int * x, int * y, int * width, int * height,
int * numClipRects, XF86DRIClipRectPtr * pClipRects,
int * backX, int * backY,
int * numBackClipRects, XF86DRIClipRectPtr * pBackClipRects );
/**
* Per-drawable private DRI driver information.
*/
......@@ -343,6 +365,12 @@ struct __DRIdrawablePrivateRec {
* Called via glXSwapBuffers().
*/
void (*swapBuffers)( __DRIdrawablePrivate *dPriv );
/**
* Get information about the location, size, and clip rects of the
* drawable within the display.
*/
GetDrawableInfo * getInfo;
};
/**
......@@ -402,6 +430,7 @@ struct __DRIscreenPrivateRec {
/**
* \name DDX version
* DDX / 2D driver version information.
* \todo Replace these fields with a \c __DRIversionRec.
*/
/*@{*/
int ddxMajor;
......@@ -412,6 +441,7 @@ struct __DRIscreenPrivateRec {
/**
* \name DRI version
* DRI X extension version information.
* \todo Replace these fields with a \c __DRIversionRec.
*/
/*@{*/
int driMajor;
......@@ -422,6 +452,7 @@ struct __DRIscreenPrivateRec {
/**
* \name DRM version
* DRM (kernel module) version information.
* \todo Replace these fields with a \c __DRIversionRec.
*/
/*@{*/
int drmMajor;
......@@ -507,6 +538,11 @@ struct __DRIscreenPrivateRec {
/**
* GLX visuals / FBConfigs for this screen. These are stored as a
* linked list.
*
* \note
* This field is \b only used in conjunction with the old interfaces. If
* the new interfaces are used, this field will be set to \c NULL and will
* not be dereferenced.
*/
__GLcontextModes *modes;
......@@ -527,16 +563,32 @@ extern void
__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp);
extern __DRIscreenPrivate * __driUtilCreateNewScreen( Display *dpy,
int scrn, __DRIscreen *psc, __GLcontextModes * modes,
const __DRIversion * ddx_version, const __DRIversion * dri_version,
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
drmAddress pSAREA, int fd, int internal_api_version,
const struct __DriverAPIRec *driverAPI );
extern __DRIscreenPrivate *
__driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
int numConfigs, __GLXvisualConfig *config,
const struct __DriverAPIRec *driverAPI);
/** This must be implemented in each driver */
/** This must be implemented in each driver
* \deprecated
*/
extern void *
__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
int numConfigs, __GLXvisualConfig *config);
/** This must be implemented in each driver */
extern void * __driCreateNewScreen( Display *dpy, int scrn, __DRIscreen *psc,
const __GLcontextModes * modes,
const __DRIversion * ddx_version, const __DRIversion * dri_version,
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
drmAddress pSAREA, int fd, int internal_api_version,
__GLcontextModes ** driver_modes );
/** This is optionally implemented in each driver */
extern void
......
......@@ -53,8 +53,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define X_XF86DRIGetDrawableInfo 9
#define X_XF86DRIGetDeviceInfo 10
#define X_XF86DRIAuthConnection 11
#define X_XF86DRIOpenFullScreen 12
#define X_XF86DRICloseFullScreen 13
#define X_XF86DRIOpenFullScreen 12 /* Deprecated */
#define X_XF86DRICloseFullScreen 13 /* Deprecated */
#define XF86DRINumberEvents 0
......@@ -145,6 +145,16 @@ Bool XF86DRICreateContext(
#endif
);
Bool XF86DRICreateContextWithConfig(
#if NeedFunctionPrototypes
Display* /* dpy */,
int /* screen */,
int /* visual ID / fbconfig ID */,
XID* /* ptr to returned context id */,
drmContextPtr /* hHWContext */
#endif
);
Bool XF86DRIDestroyContext(
#if NeedFunctionPrototypes
Display* /* dpy */,
......@@ -203,22 +213,6 @@ Bool XF86DRIGetDeviceInfo(
#endif
);
Bool XF86DRIOpenFullScreen(
#if NeedFunctionPrototypes
Display* /* dpy */,
int /* screen */,
Drawable /* drawable */
#endif
);
Bool XF86DRICloseFullScreen(
#if NeedFunctionPrototypes
Display* /* dpy */,
int /* screen */,
Drawable /* drawable */
#endif
);
_XFUNCPROTOEND
#endif /* _XF86DRI_SERVER_ */
......
......@@ -104,7 +104,7 @@ LinkSourceFile(glapi_sparc.S, $(MESASRCDIR)/src/mesa/sparc)
#endif
#if BuildXF86DRI
DRI_INCS = -I$(GLXLIBSRC)/dri
DRI_INCS = -I$(GLXLIBSRC)/dri -I$(SERVERSRC)/GL/dri
#if defined(i386Architecture) && MesaUseX86Asm
ASM_SRCS = glapi_x86.S
ASM_OBJS = glapi_x86.o
......@@ -133,6 +133,7 @@ LinkSourceFile(glapi_sparc.S, $(MESASRCDIR)/src/mesa/sparc)
-I$(MESASRCDIR)/src/mesa/glapi \
-I$(MESASRCDIR)/src/mesa/drivers/x11 \
-I$(MESASRCDIR)/src/mesa/$(ASM_DIR) \
-I$(XF86OSSRC) \
$(DRI_INCS)
#include <Library.tmpl>
......
......@@ -103,6 +103,10 @@ _gl_convert_to_x_visual_type( int visualType )
*
* \param mode Destination GL context mode.
* \param config Source GLX visual config.
*
* \note
* The \c fbconfigID and \c visualID fields of the \c __GLcontextModes
* structure will be set to the \c vid of the \c __GLXvisualConfig structure.
*/
void
_gl_copy_visual_to_context_mode( __GLcontextModes * mode,
......@@ -116,7 +120,7 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
mode->visualID = config->vid;
mode->visualType = _gl_convert_from_x_visual_type( config->class );
mode->xRenderable = GL_TRUE;
mode->fbconfigID = GLX_DONT_CARE;
mode->fbconfigID = config->vid;
mode->drawableType = GLX_WINDOW_BIT;
mode->rgbMode = (config->rgba != 0);
......@@ -161,6 +165,8 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
mode->transparentBlue = config->transparentBlue;
mode->transparentAlpha = config->transparentAlpha;
mode->transparentIndex = config->transparentIndex;
mode->swapMethod = GLX_SWAP_UNDEFINED_OML;
}
......@@ -386,3 +392,92 @@ _gl_context_modes_destroy( __GLcontextModes * modes )
modes = next;
}
}
/**
* Find a context mode matching a Visual ID.
*
* \param modes List list of context-mode structures to be searched.
* \param vid Visual ID to be found.
* \returns A pointer to a context-mode in \c modes if \c vid was found in
* the list, or \c NULL if it was not.
*/
__GLcontextModes *
_gl_context_modes_find_visual( __GLcontextModes * modes, int vid )
{
while ( modes != NULL ) {
if ( modes->visualID == vid ) {
break;
}
modes = modes->next;
}
return modes;