? lib ? src/glx/x11/depend ? src/mesa/depend ? src/mesa/drivers/dri/i810/depend ? src/mesa/drivers/dri/i915/depend ? src/mesa/x86/gen_matypes ? src/mesa/x86/matypes.h ? src/mesa/x86-64/matypes.h Index: include/GL/internal/dri_interface.h =================================================================== RCS file: /cvs/mesa/Mesa/include/GL/internal/dri_interface.h,v retrieving revision 1.17 diff -u -p -r1.17 dri_interface.h --- include/GL/internal/dri_interface.h 29 Nov 2005 23:01:43 -0000 1.17 +++ include/GL/internal/dri_interface.h 8 Mar 2006 23:56:18 -0000 @@ -287,12 +287,6 @@ struct __DRIscreenRec { int renderType, const int *attrs); /** - * Method to return a pointer to the DRI drawable data. - */ - __DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw, - void *drawablePrivate); - - /** * Opaque pointer to private per screen direct rendering data. \c NULL * if direct rendering is not supported on this screen. Never * dereferenced in libGL. @@ -361,27 +355,24 @@ struct __DRIcontextRec { void *private; /** - * Pointer to the mode used to create this context. - * - * \since Internal API version 20040317. - */ - const __GLcontextModes * mode; - - /** * Method to bind a DRI drawable to a DRI graphics context. * * \since Internal API version 20050727. */ - GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, - __DRIid read, __DRIcontext *ctx); + GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, + __DRIdrawable *pdraw, + __DRIdrawable *pread, + __DRIcontext *ctx); /** * Method to unbind a DRI drawable from a DRI graphics context. * * \since Internal API version 20050727. */ - GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, - __DRIid read, __DRIcontext *ctx); + GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, + __DRIdrawable *pdraw, + __DRIdrawable *pread, + __DRIcontext *ctx); }; /** Index: src/glx/x11/glxclient.h =================================================================== RCS file: /cvs/mesa/Mesa/src/glx/x11/glxclient.h,v retrieving revision 1.13 diff -u -p -r1.13 glxclient.h --- src/glx/x11/glxclient.h 3 Aug 2005 23:05:25 -0000 1.13 +++ src/glx/x11/glxclient.h 8 Mar 2006 23:56:19 -0000 @@ -349,6 +349,11 @@ struct __GLXcontextRec { * Per context direct rendering interface functions and data. */ __DRIcontext driContext; + + /** + * Pointer to the mode used to create this context. + */ + const __GLcontextModes * mode; #endif /** @@ -456,6 +461,8 @@ typedef struct __GLXscreenConfigsRec { * Per screen direct rendering interface functions and data. */ __DRIscreen driScreen; + void *drawHash; + void *dev_priv; #endif /** Index: src/glx/x11/glxcmds.c =================================================================== RCS file: /cvs/mesa/Mesa/src/glx/x11/glxcmds.c,v retrieving revision 1.12 diff -u -p -r1.12 glxcmds.c --- src/glx/x11/glxcmds.c 7 Feb 2006 00:39:56 -0000 1.12 +++ src/glx/x11/glxcmds.c 8 Mar 2006 23:56:20 -0000 @@ -71,31 +71,61 @@ static const char __glXGLXClientVersion[ */ #ifdef GLX_DIRECT_RENDERING -static __DRIdrawable * -GetDRIDrawable( Display *dpy, GLXDrawable drawable, int * const scrn_num ) + +/** + * Find drawables in the local hash that have been destroyed on the + * server. + * + * \param drawHash Hash-table containing all know drawables. + */ +static void GarbageCollectDRIDrawables(Display *dpy, int screen) { __GLXdisplayPrivate * const priv = __glXInitialize(dpy); + __GLXscreenConfigs *sc; + __DRIid draw; + __DRIdrawable *pdraw; + int i; - if ( (priv != NULL) && (priv->driDisplay.private != NULL) ) { - const unsigned screen_count = ScreenCount(dpy); - unsigned i; - - for ( i = 0 ; i < screen_count ; i++ ) { - __DRIscreen * const psc = &priv->screenConfigs[i].driScreen; - __DRIdrawable * const pdraw = (psc->private != NULL) - ? (*psc->getDrawable)(dpy, drawable, psc->private) : NULL; - - if ( pdraw != NULL ) { - if ( scrn_num != NULL ) { - *scrn_num = i; - } - return pdraw; + if (priv == NULL || priv->driDisplay.private == NULL) + return; + + sc = &priv->screenConfigs[i]; + if (drmHashFirst(sc->drawHash, &draw, (void *)&pdraw) == 1) { + do { + if (__glXWindowExists(dpy, draw)) { + /* Destroy the local drawable data, if the drawable no + longer exists in the Xserver */ + (*pdraw->destroyDrawable)(dpy, pdraw->private); + Xfree(pdraw); } + } while (drmHashNext(sc->drawHash, &draw, (void *)&pdraw) == 1); + } +} + +static __DRIdrawable * +GetDRIDrawable( Display *dpy, GLXDrawable drawable, int *scrn_num ) +{ + __GLXdisplayPrivate * const priv = __glXInitialize(dpy); + __DRIdrawable * const pdraw; + const unsigned screen_count = ScreenCount(dpy); + unsigned i; + __GLXscreenConfigs *sc; + + if (priv == NULL || priv->driDisplay.private == NULL) + return NULL; + + for (i = 0; i < screen_count; i++) { + sc = &priv->screenConfigs[i]; + if (drmHashLookup(sc->drawHash, drawable, (void *) &pdraw)) { + if (scrn_num != NULL) + *scrn_num = i; + return pdraw; } } return NULL; } + #endif @@ -359,7 +389,7 @@ CreateContext(Display *dpy, XVisualInfo gc->screen = mode->screen; gc->vid = mode->visualID; gc->fbconfigID = mode->fbconfigID; - gc->driContext.mode = mode; + gc->mode = mode; } } } @@ -473,6 +503,7 @@ DestroyContext(Display *dpy, GLXContext gc->driContext.private); gc->driContext.private = NULL; } + GarbageCollectDRIDrawables(dpy, gc->screen); } #endif @@ -1738,9 +1769,7 @@ PUBLIC GLint glXSwapIntervalMESA(unsigne if ( (psc != NULL) && (psc->driScreen.private != NULL) && __glXExtensionBitIsEnabled( psc, MESA_swap_control_bit ) ) { __DRIdrawable * const pdraw = - (*psc->driScreen.getDrawable)(gc->currentDpy, - gc->currentDrawable, - psc->driScreen.private); + GetDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL); if ( pdraw != NULL ) { pdraw->swap_interval = interval; return 0; @@ -1766,9 +1795,7 @@ PUBLIC GLint glXGetSwapIntervalMESA( voi if ( (psc != NULL) && (psc->driScreen.private != NULL) && __glXExtensionBitIsEnabled( psc, MESA_swap_control_bit ) ) { __DRIdrawable * const pdraw = - (*psc->driScreen.getDrawable)(gc->currentDpy, - gc->currentDrawable, - psc->driScreen.private); + GetDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL); if ( pdraw != NULL ) { return pdraw->swap_interval; } @@ -1926,9 +1953,7 @@ PUBLIC int glXWaitVideoSyncSGI(int divis if ( __glXExtensionBitIsEnabled( psc, SGI_video_sync_bit ) && psc->driScreen.private ) { __DRIdrawable * const pdraw = - (*psc->driScreen.getDrawable)(gc->currentDpy, - gc->currentDrawable, - psc->driScreen.private); + GetDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL); if ( (pdraw != NULL) && (pdraw->waitForMSC != NULL) ) { int ret; int64_t msc; Index: src/glx/x11/glxext.c =================================================================== RCS file: /cvs/mesa/Mesa/src/glx/x11/glxext.c,v retrieving revision 1.19 diff -u -p -r1.19 glxext.c --- src/glx/x11/glxext.c 11 Aug 2005 14:18:53 -0000 1.19 +++ src/glx/x11/glxext.c 8 Mar 2006 23:56:20 -0000 @@ -59,6 +59,7 @@ #include #include #include "xf86dri.h" +#include "xf86drm.h" #include "sarea.h" #include "dri_glx.h" #endif @@ -359,6 +360,8 @@ static void FreeScreenConfigs(__GLXdispl (*psc->driScreen.destroyScreen)(priv->dpy, i, psc->driScreen.private); psc->driScreen.private = NULL; + Xfree(psc->dev_priv); + drmHashDestroy(psc->drawHash); #endif } XFree((char*) priv->screenConfigs); @@ -721,7 +724,7 @@ static const __DRIinterfaceMethods inter * returned by the client-side driver. */ static void * -CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc, +CallCreateNewScreen(Display *dpy, int scrn, __GLXscreenConfigs *psc, __DRIdisplay * driDpy, PFNCREATENEWSCREENFUNC createNewScreen) { @@ -841,12 +844,12 @@ CallCreateNewScreen(Display *dpy, int sc if ( status == 0 ) { __GLcontextModes * driver_modes = NULL; - __GLXscreenConfigs *configs = psc->screenConfigs; + __GLXscreenConfigs *configs = psc->driScreen.screenConfigs; err_msg = "InitDriver"; err_extra = NULL; psp = (*createNewScreen)(dpy, scrn, - psc, + &psc->driScreen, configs->configs, & ddx_version, & dri_version, @@ -861,6 +864,8 @@ CallCreateNewScreen(Display *dpy, int sc filter_modes( & configs->configs, driver_modes ); _gl_context_modes_destroy( driver_modes ); + + psc->dev_priv = framebuffer.dev_priv; } } } @@ -1073,6 +1078,14 @@ static Bool AllocAndFetchScreenConfigs(D UnlockDisplay(dpy); #ifdef GLX_DIRECT_RENDERING + /* Create drawable hash */ + psc->drawHash = drmHashCreate(); + if ( psc->drawHash == NULL ) { + SyncHandle(); + FreeScreenConfigs(priv); + return GL_FALSE; + } + /* Initialize per screen dynamic client GLX extensions */ psc->ext_list_first_time = GL_TRUE; /* Initialize the direct rendering per screen data and functions */ @@ -1085,7 +1098,7 @@ static Bool AllocAndFetchScreenConfigs(D psc->driScreen.screenConfigs = (void *)psc; psc->driScreen.private = - CallCreateNewScreen(dpy, i, & psc->driScreen, + CallCreateNewScreen(dpy, i, psc, & priv->driDisplay, priv->driDisplay.createNewScreen[i] ); } @@ -1516,19 +1529,69 @@ static Bool SendMakeCurrentRequest( Disp #ifdef GLX_DIRECT_RENDERING +static __DRIdrawable * +FetchDRIDrawable( Display *dpy, GLXDrawable drawable, GLXContext gc) +{ + __GLXdisplayPrivate * const priv = __glXInitialize(dpy); + __DRIdrawable *pdraw; + __GLXscreenConfigs *sc; + void *empty_attribute_list = NULL; + + if (priv == NULL || priv->driDisplay.private == NULL) + return NULL; + + sc = &priv->screenConfigs[gc->screen]; + if (drmHashLookup(sc->drawHash, drawable, (void *) &pdraw)) + return pdraw; + + /* Allocate a new drawable */ + pdraw = (__DRIdrawable *)Xmalloc(sizeof(__DRIdrawable)); + if (!pdraw) + return NULL; + + /* Create a new drawable */ + (*sc->driScreen.createNewDrawable)(dpy, + gc->mode, + drawable, pdraw, + GLX_WINDOW_BIT, + empty_attribute_list); + + if (!pdraw->private) { + /* ERROR!!! */ + Xfree(pdraw); + return NULL; + } + + if (drmHashInsert(sc->drawHash, drawable, pdraw)) { + (*pdraw->destroyDrawable)(dpy, pdraw->private); + Xfree(pdraw); + return NULL; + } + + return pdraw; +} + static Bool BindContextWrapper( Display *dpy, GLXContext gc, GLXDrawable draw, GLXDrawable read ) { - return (*gc->driContext.bindContext)(dpy, gc->screen, draw, read, + __DRIdrawable *pdraw = FetchDRIDrawable(dpy, draw, gc); + __DRIdrawable *pread = FetchDRIDrawable(dpy, read, gc); + + return (*gc->driContext.bindContext)(dpy, gc->screen, pdraw, pread, & gc->driContext); } static Bool UnbindContextWrapper( GLXContext gc ) { + __DRIdrawable *pdraw; + __DRIdrawable *pread; + + pdraw = FetchDRIDrawable(gc->currentDpy, gc->currentDrawable, gc); + pread = FetchDRIDrawable(gc->currentDpy, gc->currentReadable, gc); + return (*gc->driContext.unbindContext)(gc->currentDpy, gc->screen, - gc->currentDrawable, - gc->currentReadable, + pdraw, pread, & gc->driContext ); } #endif /* GLX_DIRECT_RENDERING */ Index: src/mesa/drivers/dri/common/dri_util.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/common/dri_util.c,v retrieving revision 1.29 diff -u -p -r1.29 dri_util.c --- src/mesa/drivers/dri/common/dri_util.c 29 Nov 2005 23:01:43 -0000 1.29 +++ src/mesa/drivers/dri/common/dri_util.c 8 Mar 2006 23:56:21 -0000 @@ -89,63 +89,6 @@ __driUtilMessage(const char *f, ...) /*****************************************************************/ -/** \name Drawable list management */ -/*****************************************************************/ -/*@{*/ - -static GLboolean __driAddDrawable(void *drawHash, __DRIdrawable *pdraw) -{ - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; - - if (drmHashInsert(drawHash, pdp->draw, pdraw)) - return GL_FALSE; - - return GL_TRUE; -} - -static __DRIdrawable *__driFindDrawable(void *drawHash, __DRIid draw) -{ - int retcode; - __DRIdrawable *pdraw; - - retcode = drmHashLookup(drawHash, draw, (void *)&pdraw); - if (retcode) - return NULL; - - return pdraw; -} - - -/** - * Find drawables in the local hash that have been destroyed on the - * server. - * - * \param drawHash Hash-table containing all know drawables. - */ -static void __driGarbageCollectDrawables(void *drawHash) -{ - __DRIid draw; - __DRInativeDisplay *dpy; - __DRIdrawable *pdraw; - - if (drmHashFirst(drawHash, &draw, (void *)&pdraw) == 1) { - do { - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; - dpy = pdp->driScreenPriv->display; - if (! (*dri_interface->windowExists)(dpy, draw)) { - /* Destroy the local drawable data, if the drawable no - longer exists in the Xserver */ - (*pdraw->destroyDrawable)(dpy, pdraw->private); - _mesa_free(pdraw); - } - } while (drmHashNext(drawHash, &draw, (void *)&pdraw) == 1); - } -} - -/*@}*/ - - -/*****************************************************************/ /** \name Context (un)binding functions */ /*****************************************************************/ /*@{*/ @@ -170,12 +113,11 @@ static void __driGarbageCollectDrawables * into their respective real types it also assures they are not \c NULL. */ static GLboolean driUnbindContext(__DRInativeDisplay *dpy, int scrn, - __DRIid draw, __DRIid read, - __DRIcontext *ctx) + __DRIdrawable *pdraw, + __DRIdrawable *pread, + __DRIcontext *ctx) { __DRIscreen *pDRIScreen; - __DRIdrawable *pdraw; - __DRIdrawable *pread; __DRIcontextPrivate *pcp; __DRIscreenPrivate *psp; __DRIdrawablePrivate *pdp; @@ -186,7 +128,7 @@ static GLboolean driUnbindContext(__DRIn ** calling driUnbindContext. */ - if (ctx == NULL || draw == None || read == None) { + if (ctx == NULL || pdraw == NULL || pread == NULL) { /* ERROR!!! */ return GL_FALSE; } @@ -199,19 +141,7 @@ static GLboolean driUnbindContext(__DRIn psp = (__DRIscreenPrivate *)pDRIScreen->private; pcp = (__DRIcontextPrivate *)ctx->private; - - pdraw = __driFindDrawable(psp->drawHash, draw); - if (!pdraw) { - /* ERROR!!! */ - return GL_FALSE; - } pdp = (__DRIdrawablePrivate *)pdraw->private; - - pread = __driFindDrawable(psp->drawHash, read); - if (!pread) { - /* ERROR!!! */ - return GL_FALSE; - } prp = (__DRIdrawablePrivate *)pread->private; @@ -254,72 +184,20 @@ static GLboolean driUnbindContext(__DRIn * This function takes both a read buffer and a draw buffer. This is needed * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent * function. - * - * \bug This function calls \c driCreateNewDrawable in two places with the - * \c renderType hard-coded to \c GLX_WINDOW_BIT. Some checking might - * be needed in those places when support for pbuffers and / or pixmaps - * is added. Is it safe to assume that the drawable is a window? */ static GLboolean DoBindContext(__DRInativeDisplay *dpy, - __DRIid draw, __DRIid read, - __DRIcontext *ctx, const __GLcontextModes * modes, - __DRIscreenPrivate *psp) + __DRIdrawable *pdraw, + __DRIdrawable *pread, + __DRIcontext *ctx, + __DRIscreenPrivate *psp) { - __DRIdrawable *pdraw; __DRIdrawablePrivate *pdp; - __DRIdrawable *pread; __DRIdrawablePrivate *prp; __DRIcontextPrivate * const pcp = ctx->private; - /* Find the _DRIdrawable which corresponds to the writing drawable. */ - pdraw = __driFindDrawable(psp->drawHash, draw); - if (!pdraw) { - /* Allocate a new drawable */ - pdraw = (__DRIdrawable *)_mesa_malloc(sizeof(__DRIdrawable)); - if (!pdraw) { - /* ERROR!!! */ - return GL_FALSE; - } - - /* Create a new drawable */ - driCreateNewDrawable(dpy, modes, draw, pdraw, GLX_WINDOW_BIT, - empty_attribute_list); - if (!pdraw->private) { - /* ERROR!!! */ - _mesa_free(pdraw); - return GL_FALSE; - } - - } pdp = (__DRIdrawablePrivate *) pdraw->private; - - /* Find the _DRIdrawable which corresponds to the reading drawable. */ - if (read == draw) { - /* read buffer == draw buffer */ - prp = pdp; - } - else { - pread = __driFindDrawable(psp->drawHash, read); - if (!pread) { - /* Allocate a new drawable */ - pread = (__DRIdrawable *)_mesa_malloc(sizeof(__DRIdrawable)); - if (!pread) { - /* ERROR!!! */ - return GL_FALSE; - } - - /* Create a new drawable */ - driCreateNewDrawable(dpy, modes, read, pread, GLX_WINDOW_BIT, - empty_attribute_list); - if (!pread->private) { - /* ERROR!!! */ - _mesa_free(pread); - return GL_FALSE; - } - } - prp = (__DRIdrawablePrivate *) pread->private; - } + prp = (__DRIdrawablePrivate *) pread->private; /* Bind the drawable to the context */ pcp->driDrawablePriv = pdp; @@ -352,8 +230,9 @@ static GLboolean DoBindContext(__DRInati * function. */ static GLboolean driBindContext(__DRInativeDisplay *dpy, int scrn, - __DRIid draw, __DRIid read, - __DRIcontext * ctx) + __DRIdrawable *pdraw, + __DRIdrawable *pread, + __DRIcontext * ctx) { __DRIscreen *pDRIScreen; @@ -362,7 +241,7 @@ static GLboolean driBindContext(__DRInat ** calling driBindContext. */ - if (ctx == NULL || draw == None || read == None) { + if (ctx == NULL || pdraw == None || pread == None) { /* ERROR!!! */ return GL_FALSE; } @@ -373,7 +252,7 @@ static GLboolean driBindContext(__DRInat return GL_FALSE; } - return DoBindContext( dpy, draw, read, ctx, ctx->mode, + return DoBindContext( dpy, pdraw, pread, ctx, (__DRIscreenPrivate *)pDRIScreen->private ); } /*@}*/ @@ -423,8 +302,7 @@ __driUtilUpdateDrawableInfo(__DRIdrawabl DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - if (!__driFindDrawable(psp->drawHash, pdp->draw) || - ! (*dri_interface->getDrawableInfo)(pdp->display, pdp->screen, pdp->draw, + if (! (*dri_interface->getDrawableInfo)(pdp->display, pdp->screen, pdp->draw, &pdp->index, &pdp->lastStamp, &pdp->x, &pdp->y, &pdp->w, &pdp->h, &pdp->numClipRects, &pdp->pClipRects, @@ -631,30 +509,9 @@ static void *driCreateNewDrawable(__DRIn pdp->swapBuffers = psp->DriverAPI.SwapBuffers; - /* Add pdraw to drawable list */ - if (!__driAddDrawable(psp->drawHash, pdraw)) { - /* ERROR!!! */ - (*pdraw->destroyDrawable)(dpy, pdp); - _mesa_free(pdp); - pdp = NULL; - pdraw->private = NULL; - } - return (void *) pdp; } -static __DRIdrawable * -driGetDrawable(__DRInativeDisplay *dpy, __DRIid draw, void *screenPrivate) -{ - __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; - - /* - ** Make sure this routine returns NULL if the drawable is not bound - ** to a direct rendering context! - */ - return __driFindDrawable(psp->drawHash, draw); -} - static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate) { @@ -705,7 +562,6 @@ driDestroyContext(__DRInativeDisplay *dp if (pcp) { (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp); - __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); (void) (*dri_interface->destroyContext)(dpy, scrn, pcp->contextID); _mesa_free(pcp); } @@ -790,8 +646,6 @@ driCreateNewContext(__DRInativeDisplay * return NULL; } - __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); - return pcp; } /*@}*/ @@ -828,7 +682,6 @@ static void driDestroyScreen(__DRInative (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); - _mesa_free(psp->pDevPriv); (void)drmClose(psp->fd); if ( psp->modes != NULL ) { (*dri_interface->destroyContextModes)( psp->modes ); @@ -943,7 +796,6 @@ __driUtilCreateNewScreen(__DRInativeDisp psc->destroyScreen = driDestroyScreen; psc->createNewDrawable = driCreateNewDrawable; - psc->getDrawable = driGetDrawable; psc->getMSC = driGetMSC; psc->createNewContext = driCreateNewContext; Index: src/mesa/drivers/dri/common/glcontextmodes.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c,v retrieving revision 1.10 diff -u -p -r1.10 glcontextmodes.c --- src/mesa/drivers/dri/common/glcontextmodes.c 9 Feb 2006 14:28:40 -0000 1.10 +++ src/mesa/drivers/dri/common/glcontextmodes.c 8 Mar 2006 23:56:21 -0000 @@ -37,7 +37,6 @@ # include # include "GL/internal/dri_interface.h" # include "imports.h" -# define __glXMemset memset #else # if defined(HAVE_DIX_CONFIG_H) # include @@ -48,13 +47,13 @@ # ifdef XFree86Server # include "GL/glx_ansic.h" -extern void * __glXMalloc( size_t size ); -extern void __glXFree( void * ptr ); -# define _mesa_malloc(b) __glXMalloc(b) -# define _mesa_free(m) __glXFree(m) +# include "os.h" +# define _mesa_malloc(b) xalloc(b) +# define _mesa_free(m) xfree(m) +# define _mesa_memset(dst, val, n) memset(dst, val, n) # else # include -# define __glXMemset memset +# define _mesa_memset(dst, val, n) memset(dst, val, n) # define _mesa_malloc(b) Xmalloc(b) # define _mesa_free(m) Xfree(m) # endif /* XFree86Server */ @@ -129,7 +128,7 @@ _gl_copy_visual_to_context_mode( __GLcon { __GLcontextModes * const next = mode->next; - (void) __glXMemset( mode, 0, sizeof( __GLcontextModes ) ); + (void) _mesa_memset( mode, 0, sizeof( __GLcontextModes ) ); mode->next = next; mode->visualID = config->vid; @@ -370,7 +369,7 @@ _gl_context_modes_create( unsigned count break; } - (void) __glXMemset( *next, 0, size ); + (void) _mesa_memset( *next, 0, size ); (*next)->visualID = GLX_DONT_CARE; (*next)->visualType = GLX_DONT_CARE; (*next)->visualRating = GLX_NONE;