savage: Fix driver build post-ARB_sync.

Like s3v, clean up absurd use of Xlib in the driver, avoiding namespace
pollution.
This commit is contained in:
Eric Anholt 2009-09-01 12:37:51 -07:00 committed by Ian Romanick
parent 19420f02d4
commit d5ea2dce93
2 changed files with 6 additions and 8 deletions

View File

@ -23,7 +23,6 @@
*/ */
#include <X11/Xlibint.h>
#include <stdio.h> #include <stdio.h>
#include "main/context.h" #include "main/context.h"
@ -180,7 +179,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
} }
/* Allocate the private area */ /* Allocate the private area */
savageScreen = (savageScreenPrivate *)Xmalloc(sizeof(savageScreenPrivate)); savageScreen = (savageScreenPrivate *)_mesa_malloc(sizeof(savageScreenPrivate));
if (!savageScreen) if (!savageScreen)
return GL_FALSE; return GL_FALSE;
@ -227,7 +226,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
savageScreen->agpTextures.handle, savageScreen->agpTextures.handle,
savageScreen->agpTextures.size, savageScreen->agpTextures.size,
(drmAddress *)&(savageScreen->agpTextures.map)) != 0) { (drmAddress *)&(savageScreen->agpTextures.map)) != 0) {
Xfree(savageScreen); _mesa_free(savageScreen);
sPriv->private = NULL; sPriv->private = NULL;
return GL_FALSE; return GL_FALSE;
} }
@ -247,7 +246,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
savageScreen->aperture.size, savageScreen->aperture.size,
(drmAddress *)&savageScreen->aperture.map) != 0) (drmAddress *)&savageScreen->aperture.map) != 0)
{ {
Xfree(savageScreen); _mesa_free(savageScreen);
sPriv->private = NULL; sPriv->private = NULL;
return GL_FALSE; return GL_FALSE;
} }
@ -283,7 +282,7 @@ savageDestroyScreen(__DRIscreenPrivate *sPriv)
/* free all option information */ /* free all option information */
driDestroyOptionInfo (&savageScreen->optionCache); driDestroyOptionInfo (&savageScreen->optionCache);
Xfree(savageScreen); _mesa_free(savageScreen);
sPriv->private = NULL; sPriv->private = NULL;
} }
@ -301,7 +300,7 @@ savageCreateContext( const __GLcontextModes *mesaVis,
savageScreen->sarea_priv_offset); savageScreen->sarea_priv_offset);
int textureSize[SAVAGE_NR_TEX_HEAPS]; int textureSize[SAVAGE_NR_TEX_HEAPS];
int i; int i;
imesa = (savageContextPtr)Xcalloc(sizeof(savageContext), 1); imesa = (savageContextPtr)_mesa_calloc(sizeof(savageContext));
if (!imesa) { if (!imesa) {
return GL_FALSE; return GL_FALSE;
} }
@ -318,7 +317,7 @@ savageCreateContext( const __GLcontextModes *mesaVis,
shareCtx = NULL; shareCtx = NULL;
ctx = _mesa_create_context(mesaVis, shareCtx, &functions, imesa); ctx = _mesa_create_context(mesaVis, shareCtx, &functions, imesa);
if (!ctx) { if (!ctx) {
Xfree(imesa); _mesa_free(imesa);
return GL_FALSE; return GL_FALSE;
} }
driContextPriv->driverPrivate = imesa; driContextPriv->driverPrivate = imesa;

View File

@ -31,7 +31,6 @@ typedef struct savage_context_t savageContext;
typedef struct savage_context_t *savageContextPtr; typedef struct savage_context_t *savageContextPtr;
typedef struct savage_texture_object_t *savageTextureObjectPtr; typedef struct savage_texture_object_t *savageTextureObjectPtr;
#include <X11/Xlibint.h>
#include "dri_util.h" #include "dri_util.h"
#include "main/mtypes.h" #include "main/mtypes.h"
#include "xf86drm.h" #include "xf86drm.h"