summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c139
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h24
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_xmesa.c22
-rw-r--r--src/mesa/drivers/dri/i810/i810screen.c23
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c33
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c22
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_screen.c22
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c22
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_screen.c22
-rw-r--r--src/mesa/drivers/dri/r128/r128_screen.c22
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c6
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.h6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c25
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c22
-rw-r--r--src/mesa/drivers/dri/sis/sis_screen.c23
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c22
-rw-r--r--src/mesa/drivers/dri/trident/trident_context.c24
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c3
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.h1
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c23
20 files changed, 216 insertions, 290 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 1f916a82cad..2b5d6f0a598 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -33,7 +33,7 @@
#include "drm_sarea.h"
#ifndef GLX_OML_sync_control
-typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid drawable, int32_t *numerator, int32_t *denominator);
+typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRIdrawable *drawable, int32_t *numerator, int32_t *denominator);
#endif
/* This pointer *must* be set by the driver's __driCreateNewScreen funciton!
@@ -53,16 +53,16 @@ static const int empty_attribute_list[1] = { None };
static int api_ver = 0;
/* forward declarations */
-static int driQueryFrameTracking( __DRInativeDisplay *dpy, void *priv,
+static int driQueryFrameTracking( void *priv,
int64_t *sbc, int64_t *missedFrames,
float *lastMissedUsage, float *usage );
-static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
- const __GLcontextModes *modes,
+static void *driCreateNewDrawable(__DRIscreen *screen,
+ const __GLcontextModes *modes,
__DRIid draw, __DRIdrawable *pdraw,
int renderType, const int *attrs);
-static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate);
+static void driDestroyDrawable(void *drawablePrivate);
/**
@@ -96,8 +96,7 @@ __driUtilMessage(const char *f, ...)
/**
* Unbind context.
*
- * \param dpy the display handle.
- * \param scrn the screen number.
+ * \param scrn the screen.
* \param gc context.
*
* \return \c GL_TRUE on success, or \c GL_FALSE on failure.
@@ -110,10 +109,8 @@ __driUtilMessage(const char *f, ...)
* While casting the opaque private pointers associated with the parameters
* into their respective real types it also assures they are not \c NULL.
*/
-static GLboolean driUnbindContext(__DRInativeDisplay *dpy, int scrn,
- __DRIcontext *ctx)
+static GLboolean driUnbindContext(__DRIcontext *ctx)
{
- __DRIscreen *pDRIScreen;
__DRIcontextPrivate *pcp;
__DRIscreenPrivate *psp;
__DRIdrawablePrivate *pdp;
@@ -124,19 +121,11 @@ static GLboolean driUnbindContext(__DRInativeDisplay *dpy, int scrn,
** calling driUnbindContext.
*/
- if (ctx == NULL) {
- /* ERROR!!! */
- return GL_FALSE;
- }
+ if (ctx == NULL)
+ return GL_FALSE;
- pDRIScreen = (*dri_interface->getScreen)(dpy, scrn);
- if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
- /* ERROR!!! */
- return GL_FALSE;
- }
-
- psp = (__DRIscreenPrivate *)pDRIScreen->private;
pcp = (__DRIcontextPrivate *)ctx->private;
+ psp = (__DRIscreenPrivate *)pcp->driScreenPriv;
pdp = (__DRIdrawablePrivate *)pcp->driDrawablePriv;
prp = (__DRIdrawablePrivate *)pcp->driReadablePriv;
@@ -179,16 +168,14 @@ static GLboolean driUnbindContext(__DRInativeDisplay *dpy, int scrn,
* for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent
* function.
*/
-static GLboolean DoBindContext(__DRInativeDisplay *dpy,
- __DRIdrawable *pdraw,
+static GLboolean DoBindContext(__DRIdrawable *pdraw,
__DRIdrawable *pread,
- __DRIcontext *ctx,
- __DRIscreenPrivate *psp)
+ __DRIcontext *ctx)
{
__DRIdrawablePrivate *pdp;
__DRIdrawablePrivate *prp;
__DRIcontextPrivate * const pcp = ctx->private;
-
+ __DRIscreenPrivate *psp = pcp->driScreenPriv;
pdp = (__DRIdrawablePrivate *) pdraw->private;
prp = (__DRIdrawablePrivate *) pread->private;
@@ -230,31 +217,19 @@ static GLboolean DoBindContext(__DRInativeDisplay *dpy,
* for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent
* function.
*/
-static GLboolean driBindContext(__DRInativeDisplay *dpy, int scrn,
- __DRIdrawable *pdraw,
+static GLboolean driBindContext(__DRIdrawable *pdraw,
__DRIdrawable *pread,
__DRIcontext * ctx)
{
- __DRIscreen *pDRIScreen;
-
/*
** Assume error checking is done properly in glXMakeCurrent before
** calling driBindContext.
*/
- if (ctx == NULL || pdraw == None || pread == None) {
- /* ERROR!!! */
- return GL_FALSE;
- }
-
- pDRIScreen = (*dri_interface->getScreen)(dpy, scrn);
- if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
- /* ERROR!!! */
+ if (ctx == NULL || pdraw == None || pread == None)
return GL_FALSE;
- }
- return DoBindContext( dpy, pdraw, pread, ctx,
- (__DRIscreenPrivate *)pDRIScreen->private );
+ return DoBindContext( pdraw, pread, ctx );
}
/*@}*/
@@ -311,7 +286,7 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
- if (! (*dri_interface->getDrawableInfo)(pdp->display, pdp->screen, pdp->draw,
+ if (! (*dri_interface->getDrawableInfo)(pdp->driScreenPriv->psc, pdp->draw,
&pdp->index, &pdp->lastStamp,
&pdp->x, &pdp->y, &pdp->w, &pdp->h,
&pdp->numClipRects, &pdp->pClipRects,
@@ -345,7 +320,6 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
/**
* Swap buffers.
*
- * \param dpy the display handle.
* \param drawablePrivate opaque pointer to the per-drawable private info.
*
* \internal
@@ -353,7 +327,7 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
*
* Is called directly from glXSwapBuffers().
*/
-static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate )
+static void driSwapBuffers(void *drawablePrivate)
{
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
drm_clip_rect_t rect;
@@ -374,8 +348,7 @@ static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate )
* front buffer, so we report the damage there rather than to the backing
* store (if any).
*/
- (*dri_interface->reportDamage)(dpy, dPriv->screen, dPriv->draw,
- dPriv->x, dPriv->y,
+ (*dri_interface->reportDamage)(dPriv->pdraw, dPriv->x, dPriv->y,
&rect, 1, GL_TRUE);
}
@@ -392,7 +365,7 @@ static int driGetMSC( void *screenPrivate, int64_t *msc )
/**
* Called directly from a number of higher-level GLX functions.
*/
-static int driGetSBC( __DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc )
+static int driGetSBC( void *drawablePrivate, int64_t *sbc )
{
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
__DRIswapInfo sInfo;
@@ -405,8 +378,7 @@ static int driGetSBC( __DRInativeDisplay *dpy, void *drawablePrivate, int64_t *s
return status;
}
-static int driWaitForSBC( __DRInativeDisplay * dpy, void *drawablePriv,
- int64_t target_sbc,
+static int driWaitForSBC( void *drawablePriv, int64_t target_sbc,
int64_t * msc, int64_t * sbc )
{
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv;
@@ -415,8 +387,7 @@ static int driWaitForSBC( __DRInativeDisplay * dpy, void *drawablePriv,
msc, sbc );
}
-static int driWaitForMSC( __DRInativeDisplay * dpy, void *drawablePriv,
- int64_t target_msc,
+static int driWaitForMSC( void *drawablePriv, int64_t target_msc,
int64_t divisor, int64_t remainder,
int64_t * msc, int64_t * sbc )
{
@@ -442,8 +413,7 @@ static int driWaitForMSC( __DRInativeDisplay * dpy, void *drawablePriv,
return status;
}
-static int64_t driSwapBuffersMSC( __DRInativeDisplay * dpy, void *drawablePriv,
- int64_t target_msc,
+static int64_t driSwapBuffersMSC( void *drawablePriv, int64_t target_msc,
int64_t divisor, int64_t remainder )
{
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv;
@@ -453,25 +423,23 @@ static int64_t driSwapBuffersMSC( __DRInativeDisplay * dpy, void *drawablePriv,
remainder );
}
-static void driCopySubBuffer( __DRInativeDisplay *dpy, void *drawablePrivate,
+static void driCopySubBuffer( void *drawablePrivate,
int x, int y, int w, int h)
{
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
dPriv->driScreenPriv->DriverAPI.CopySubBuffer(dPriv, x, y, w, h);
- (void) dpy;
}
/**
* This is called via __DRIscreenRec's createNewDrawable pointer.
*/
-static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
+static void *driCreateNewDrawable(__DRIscreen *screen,
const __GLcontextModes *modes,
__DRIid draw,
__DRIdrawable *pdraw,
int renderType,
const int *attrs)
{
- __DRIscreen * const pDRIScreen = (*dri_interface->getScreen)(dpy, modes->screen);
__DRIscreenPrivate *psp;
__DRIdrawablePrivate *pdp;
@@ -483,16 +451,14 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
*/
(void) attrs;
- if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
- return NULL;
- }
-
pdp = (__DRIdrawablePrivate *)_mesa_malloc(sizeof(__DRIdrawablePrivate));
if (!pdp) {
return NULL;
}
- if (!(*dri_interface->createDrawable)(dpy, modes->screen, draw, &pdp->hHWDrawable)) {
+ /* Ensure that modes->screen and screen are the same screen? */
+
+ if (!(*dri_interface->createDrawable)(screen, draw, &pdp->hHWDrawable)) {
_mesa_free(pdp);
return NULL;
}
@@ -511,16 +477,14 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
pdp->numBackClipRects = 0;
pdp->pClipRects = NULL;
pdp->pBackClipRects = NULL;
- pdp->display = dpy;
- pdp->screen = modes->screen;
- psp = (__DRIscreenPrivate *)pDRIScreen->private;
+ psp = (__DRIscreenPrivate *)screen->private;
pdp->driScreenPriv = psp;
pdp->driContextPriv = &psp->dummyContextPriv;
if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, modes,
renderType == GLX_PIXMAP_BIT)) {
- (void)(*dri_interface->destroyDrawable)(dpy, modes->screen, pdp->draw);
+ (void)(*dri_interface->destroyDrawable)(screen, pdp->draw);
_mesa_free(pdp);
return NULL;
}
@@ -551,17 +515,15 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
}
static void
-driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
+driDestroyDrawable(void *drawablePrivate)
{
__DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawablePrivate;
__DRIscreenPrivate *psp;
- int scrn;
if (pdp) {
psp = pdp->driScreenPriv;
- scrn = psp->myNum;
(*psp->DriverAPI.DestroyBuffer)(pdp);
- (void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw);
+ (void)(*dri_interface->destroyDrawable)(psp->psc, pdp->draw);
if (pdp->pClipRects) {
_mesa_free(pdp->pClipRects);
pdp->pClipRects = NULL;
@@ -585,8 +547,6 @@ driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
/**
* Destroy the per-context private information.
*
- * \param dpy the display handle.
- * \param scrn the screen number.
* \param contextPrivate opaque pointer to the per-drawable private info.
*
* \internal
@@ -594,13 +554,14 @@ driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
* drmDestroyContext(), and finally frees \p contextPrivate.
*/
static void
-driDestroyContext(__DRInativeDisplay *dpy, int scrn, void *contextPrivate)
+driDestroyContext(void *contextPrivate)
{
__DRIcontextPrivate *pcp = (__DRIcontextPrivate *) contextPrivate;
if (pcp) {
(*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp);
- (void) (*dri_interface->destroyContext)(dpy, scrn, pcp->contextID);
+ (void) (*dri_interface->destroyContext)(pcp->driScreenPriv->psc,
+ pcp->contextID);
_mesa_free(pcp);
}
}
@@ -628,35 +589,27 @@ driDestroyContext(__DRInativeDisplay *dpy, int scrn, void *contextPrivate)
*
*/
static void *
-driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
+driCreateNewContext(__DRIscreen *screen, const __GLcontextModes *modes,
int render_type, void *sharedPrivate, __DRIcontext *pctx)
{
- __DRIscreen *pDRIScreen;
__DRIcontextPrivate *pcp;
__DRIcontextPrivate *pshare = (__DRIcontextPrivate *) sharedPrivate;
__DRIscreenPrivate *psp;
void * const shareCtx = (pshare != NULL) ? pshare->driverPrivate : NULL;
- pDRIScreen = (*dri_interface->getScreen)(dpy, modes->screen);
- if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
- /* ERROR!!! */
- return NULL;
- }
-
- psp = (__DRIscreenPrivate *)pDRIScreen->private;
+ psp = (__DRIscreenPrivate *)screen->private;
pcp = (__DRIcontextPrivate *)_mesa_malloc(sizeof(__DRIcontextPrivate));
if (!pcp) {
return NULL;
}
- if (! (*dri_interface->createContext)(dpy, modes->screen, modes->fbconfigID,
- &pcp->contextID, &pcp->hHWContext)) {
+ if (! (*dri_interface->createContext)(screen, modes->fbconfigID,
+ &pcp->contextID, &pcp->hHWContext)) {
_mesa_free(pcp);
return NULL;
}
- pcp->display = dpy;
pcp->driScreenPriv = psp;
pcp->driDrawablePriv = NULL;
@@ -678,8 +631,7 @@ driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
pctx->unbindContext = driUnbindContext;
if ( !(*psp->DriverAPI.CreateContext)(modes, pcp, shareCtx) ) {
- (void) (*dri_interface->destroyContext)(dpy, modes->screen,
- pcp->contextID);
+ (void) (*dri_interface->destroyContext)(screen, pcp->contextID);
_mesa_free(pcp);
return NULL;
}
@@ -705,7 +657,7 @@ driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
* This function calls __DriverAPIRec::DestroyScreen on \p screenPrivate, calls
* drmClose(), and finally frees \p screenPrivate.
*/
-static void driDestroyScreen(__DRInativeDisplay *dpy, int scrn, void *screenPrivate)
+static void driDestroyScreen(void *screenPrivate)
{
__DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate;
@@ -760,7 +712,7 @@ static void driDestroyScreen(__DRInativeDisplay *dpy, int scrn, void *screenPriv
* loader that is too old to even load this driver.
*/
__DRIscreenPrivate *
-__driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
+__driUtilCreateNewScreen(int scr, __DRIscreen *psc,
__GLcontextModes * modes,
const __DRIversion * ddx_version,
const __DRIversion * dri_version,
@@ -781,8 +733,6 @@ __driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
return NULL;
}
- psp->display = dpy;
- psp->myNum = scrn;
psp->psc = psc;
psp->modes = modes;
@@ -818,6 +768,7 @@ __driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
psp->fbBPP = psp->fbStride * 8 / frame_buffer->width;
psp->fd = fd;
+ psp->myNum = scr;
/*
** Do not init dummy context here; actual initialization will be
@@ -873,7 +824,7 @@ int driCompareGLXAPIVersion( GLint required_version )
static int
-driQueryFrameTracking( __DRInativeDisplay * dpy, void * priv,
+driQueryFrameTracking( void * priv,
int64_t * sbc, int64_t * missedFrames,
float * lastMissedUsage, float * usage )
{
@@ -935,7 +886,7 @@ driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust,
float usage = 1.0;
- if ( (*dri_interface->getMSCRate)( dPriv->display, dPriv->draw, &n, &d ) ) {
+ if ( (*dri_interface->getMSCRate)(dPriv->pdraw, &n, &d) ) {
interval = (dPriv->pdraw->swap_interval != 0)
? dPriv->pdraw->swap_interval : 1;
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index a08eab1616e..cae170c5f81 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -318,17 +318,6 @@ struct __DRIdrawablePrivateRec {
__DRIscreenPrivate *driScreenPriv;
/**
- * \name Display and screen information.
- *
- * Basically just need these for when the locking code needs to call
- * \c __driUtilUpdateDrawableInfo.
- */
- /*@{*/
- __DRInativeDisplay *display;
- int screen;
- /*@}*/
-
- /**
* Called via glXSwapBuffers().
*/
void (*swapBuffers)( __DRIdrawablePrivate *dPriv );
@@ -354,9 +343,9 @@ struct __DRIcontextPrivateRec {
void *driverPrivate;
/**
- * This context's display pointer.
+ * Pointer back to the \c __DRIcontext that contains this structure.
*/
- __DRInativeDisplay *display;
+ __DRIcontext *pctx;
/**
* Pointer to drawable currently bound to this context for drawing.
@@ -379,11 +368,6 @@ struct __DRIcontextPrivateRec {
*/
struct __DRIscreenPrivateRec {
/**
- * Display for this screen
- */
- __DRInativeDisplay *display;
-
- /**
* Current screen's number
*/
int myNum;
@@ -535,8 +519,8 @@ extern void
__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp);
-extern __DRIscreenPrivate * __driUtilCreateNewScreen( __DRInativeDisplay *dpy,
- int scrn, __DRIscreen *psc, __GLcontextModes * modes,
+extern __DRIscreenPrivate * __driUtilCreateNewScreen( int scr, __DRIscreen *psc,
+ __GLcontextModes * modes,
const __DRIversion * ddx_version, const __DRIversion * dri_version,
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
drm_sarea_t *pSAREA, int fd, int internal_api_version,
diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
index 4c5323d230e..4cd5b9a2080 100644
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
@@ -714,16 +714,16 @@ ffbFillInModes( unsigned pixel_bits, unsigned depth_bits,
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
@@ -740,7 +740,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &ffbAPI);
diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c
index c0a7cdb90a9..b04bc383270 100644
--- a/src/mesa/drivers/dri/i810/i810screen.c
+++ b/src/mesa/drivers/dri/i810/i810screen.c
@@ -431,17 +431,16 @@ static const struct __DriverAPIRec i810API = {
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20070105( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
-
+void *__DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
static const __DRIversion ddx_expected = { 1, 0, 0 };
@@ -457,7 +456,7 @@ void * __driCreateNewScreen_20070105( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &i810API);
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index 2721a900945..7a11672a8f1 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -886,18 +886,18 @@ intelFillInModes(unsigned pixel_bits, unsigned depth_bits,
* \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
* failure.
*/
-PUBLIC void *
-__driCreateNewScreen_20050727(__DRInativeDisplay * 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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes)
+PUBLIC
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
static const __DRIversion ddx_expected = { 1, 5, 0 };
@@ -913,11 +913,10 @@ __driCreateNewScreen_20050727(__DRInativeDisplay * dpy, int scrn,
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
- ddx_version, dri_version, drm_version,
- frame_buffer, pSAREA, fd,
- internal_api_version, &intelAPI);
-
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
+ ddx_version, dri_version, drm_version,
+ frame_buffer, pSAREA, fd,
+ internal_api_version, &intelAPI);
if (psp != NULL) {
I830DRIPtr dri_priv = (I830DRIPtr) psp->pDevPriv;
*driver_modes = intelFillInModes(dri_priv->cpp * 8,
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 5dac50df32c..29ea07d78ef 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -650,16 +650,16 @@ intelFillInModes( unsigned pixel_bits, unsigned depth_bits,
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void * __DRI_CREATE_NEW_SCREEN( 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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes )
{
__DRIscreenPrivate *psp;
@@ -676,7 +676,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &intelAPI);
diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c
index 4e9e216e7db..52b96bf0bc0 100644
--- a/src/mesa/drivers/dri/mach64/mach64_screen.c
+++ b/src/mesa/drivers/dri/mach64/mach64_screen.c
@@ -505,16 +505,16 @@ static struct __DriverAPIRec mach64API = {
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
@@ -531,7 +531,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &mach64API);
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index f4e651afa0c..372d2ce4339 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -963,16 +963,16 @@ static const struct __DriverAPIRec mgaAPI = {
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
@@ -989,7 +989,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &mgaAPI);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 065aa81746c..cab53f41ad4 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -295,16 +295,16 @@ nouveauFillInModes( unsigned pixel_bits, unsigned depth_bits,
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes)
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
@@ -331,7 +331,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &nouveauAPI);
diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c
index 880dee85c25..a84b54924ac 100644
--- a/src/mesa/drivers/dri/r128/r128_screen.c
+++ b/src/mesa/drivers/dri/r128/r128_screen.c
@@ -514,16 +514,16 @@ r128FillInModes( unsigned pixel_bits, unsigned depth_bits,
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
@@ -541,7 +541,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &r128API);
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index 2366bde5250..c9c5a861722 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -857,7 +857,7 @@ void r200Finish( GLcontext *ctx )
* the kernel data structures, and the current context to get the
* device fd.
*/
-void *r200AllocateMemoryMESA(__DRInativeDisplay *dpy, int scrn, GLsizei size,
+void *r200AllocateMemoryMESA(__DRIscreen *screen, GLsizei size,
GLfloat readfreq, GLfloat writefreq,
GLfloat priority)
{
@@ -899,7 +899,7 @@ void *r200AllocateMemoryMESA(__DRInativeDisplay *dpy, int scrn, GLsizei size,
/* Called via glXFreeMemoryMESA() */
-void r200FreeMemoryMESA(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer)
+void r200FreeMemoryMESA(__DRIscreen *screen, GLvoid *pointer)
{
GET_CURRENT_CONTEXT(ctx);
r200ContextPtr rmesa;
@@ -936,7 +936,7 @@ void r200FreeMemoryMESA(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer)
}
/* Called via glXGetMemoryOffsetMESA() */
-GLuint r200GetMemoryOffsetMESA(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer)
+GLuint r200GetMemoryOffsetMESA(__DRIscreen *screen, const GLvoid *pointer)
{
GET_CURRENT_CONTEXT(ctx);
r200ContextPtr rmesa;
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.h b/src/mesa/drivers/dri/r200/r200_ioctl.h
index 5ed1555f6a3..bf126799472 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.h
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.h
@@ -98,10 +98,10 @@ extern void r200WaitForIdleLocked( r200ContextPtr rmesa );
extern void r200WaitForVBlank( r200ContextPtr rmesa );
extern void r200InitIoctlFuncs( struct dd_function_table *functions );
-extern void *r200AllocateMemoryMESA( __DRInativeDisplay *dpy, int scrn, GLsizei size, GLfloat readfreq,
+extern void *r200AllocateMemoryMESA( __DRIscreen *screen, GLsizei size, GLfloat readfreq,
GLfloat writefreq, GLfloat priority );
-extern void r200FreeMemoryMESA( __DRInativeDisplay *dpy, int scrn, GLvoid *pointer );
-extern GLuint r200GetMemoryOffsetMESA( __DRInativeDisplay *dpy, int scrn, const GLvoid *pointer );
+extern void r200FreeMemoryMESA( __DRIscreen *screen, GLvoid *pointer );
+extern GLuint r200GetMemoryOffsetMESA( __DRIscreen *screen, const GLvoid *pointer );
extern GLboolean r200IsGartMemory( r200ContextPtr rmesa, const GLvoid *pointer,
GLint size );
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 682cf3a5ee5..2d44532a843 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -990,17 +990,16 @@ static const struct __DriverAPIRec r200API = {
* failure.
*/
PUBLIC void *
-__driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+__DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
#if !RADEON_COMMON
@@ -1029,12 +1028,12 @@ __driCreateNewScreen_20050727( __DRInativeDisplay *dpy,
return NULL;
}
#if !RADEON_COMMON || (RADEON_COMMON && defined(RADEON_COMMON_FOR_R300))
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &radeonAPI);
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &r200API);
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 43422db9a82..e8a63ae51b9 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -1027,16 +1027,16 @@ savageFillInModes( unsigned pixel_bits, unsigned depth_bits,
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes )
{
__DRIscreenPrivate *psp;
@@ -1053,7 +1053,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &savageAPI);
diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c
index 89d734ba786..a1275f00263 100644
--- a/src/mesa/drivers/dri/sis/sis_screen.c
+++ b/src/mesa/drivers/dri/sis/sis_screen.c
@@ -333,17 +333,16 @@ static struct __DriverAPIRec sisAPI = {
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes **driver_modes )
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes **driver_modes)
{
__DRIscreenPrivate *psp;
@@ -359,7 +358,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn,
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &sisAPI);
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index 1f9ff4e30ca..899963d06d3 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -442,16 +442,16 @@ static __GLcontextModes *tdfxFillInModes(unsigned pixel_bits,
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void *__DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
static const __DRIversion ddx_expected = { 1, 1, 0 };
@@ -467,7 +467,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &tdfxAPI);
diff --git a/src/mesa/drivers/dri/trident/trident_context.c b/src/mesa/drivers/dri/trident/trident_context.c
index 8dc7f0dc781..1d2a49e6f4a 100644
--- a/src/mesa/drivers/dri/trident/trident_context.c
+++ b/src/mesa/drivers/dri/trident/trident_context.c
@@ -430,17 +430,17 @@ static struct __DriverAPIRec tridentAPI = {
};
-PUBLIC void *__driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+PUBLIC void *
+__DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
static const __DRIversion ddx_expected = { 4, 0, 0 };
@@ -456,7 +456,7 @@ PUBLIC void *__driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn,
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &tridentAPI);
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 7c738777209..66e92cc602e 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -601,9 +601,6 @@ viaCreateContext(const __GLcontextModes *visual,
_tnl_allow_pixel_fog(ctx, GL_FALSE);
_tnl_allow_vertex_fog(ctx, GL_TRUE);
-/* vmesa->display = dpy; */
- vmesa->display = sPriv->display;
-
vmesa->hHWContext = driContextPriv->hHWContext;
vmesa->driFd = sPriv->fd;
vmesa->driHwLock = &sPriv->pSAREA->lock;
diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h
index fecd2782fba..63217136882 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.h
+++ b/src/mesa/drivers/dri/unichrome/via_context.h
@@ -289,7 +289,6 @@ struct via_context {
drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
- __DRInativeDisplay *display;
/**
* DRI drawable bound to this context for drawing.
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index 90f76be44d4..c10b7d1a9b1 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -418,17 +418,16 @@ viaFillInModes( unsigned pixel_bits, GLboolean have_back_buffer )
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050727( __DRInativeDisplay *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,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+void * __DRI_CREATE_NEW_SCREEN(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,
+ const __DRIinterfaceMethods * interface,
+ __GLcontextModes ** driver_modes)
{
__DRIscreenPrivate *psp;
@@ -448,7 +447,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn,
return NULL;
}
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
+ psp = __driUtilCreateNewScreen(scrn, psc, NULL,
ddx_version, dri_version, drm_version,
frame_buffer, pSAREA, fd,
internal_api_version, &viaAPI);