Fixed some suspicious pointer casts that caused lots of
compile-time-warnings on x86-64. Not tested on x86-64 yet, but a good thing in general, so I'm giving up waiting for feedback. See also https://bugs.freedesktop.org/show_bug.cgi?id=2924.
This commit is contained in:
parent
07d91bbb59
commit
a7fcac5e92
|
@ -213,7 +213,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
|
|||
savageScreen->agpTextures.map = NULL;
|
||||
|
||||
savageScreen->texVirtual[SAVAGE_CARD_HEAP] =
|
||||
(drmAddress)(((unsigned int)sPriv->pFB)+gDRIPriv->textureOffset);
|
||||
(drmAddress)(((GLubyte *)sPriv->pFB)+gDRIPriv->textureOffset);
|
||||
savageScreen->texVirtual[SAVAGE_AGP_HEAP] =
|
||||
(drmAddress)(savageScreen->agpTextures.map);
|
||||
|
||||
|
@ -364,8 +364,8 @@ savageCreateContext( const __GLcontextModes *mesaVis,
|
|||
|
||||
for(i=0;i<5;i++)
|
||||
{
|
||||
imesa->apertureBase[i] = ((GLuint)savageScreen->aperture.map +
|
||||
0x01000000 * i );
|
||||
imesa->apertureBase[i] = (GLubyte *)savageScreen->aperture.map +
|
||||
0x01000000 * i;
|
||||
}
|
||||
|
||||
imesa->aperturePitch = savageScreen->aperturePitch;
|
||||
|
|
|
@ -179,7 +179,7 @@ struct savage_context_t {
|
|||
struct savage_vtxbuf_t *vtxBuf;
|
||||
|
||||
/* aperture base */
|
||||
GLuint apertureBase[5];
|
||||
GLubyte *apertureBase[5];
|
||||
GLuint aperturePitch;
|
||||
/* Manage hardware state */
|
||||
GLuint dirty;
|
||||
|
@ -236,8 +236,8 @@ struct savage_context_t {
|
|||
|
||||
/* These refer to the current draw (front vs. back) buffer:
|
||||
*/
|
||||
char *drawMap; /* draw buffer address in virtual mem */
|
||||
char *readMap;
|
||||
GLubyte *drawMap; /* draw buffer address in virtual mem */
|
||||
GLubyte *readMap;
|
||||
int drawX; /* origin of drawable in draw buffer */
|
||||
int drawY;
|
||||
GLuint numClipRects; /* cliprects for that buffer */
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
GLuint cpp = savageScreen->cpp; \
|
||||
GLuint pitch = imesa->aperturePitch; \
|
||||
GLuint height = dPriv->h; \
|
||||
char *buf = (char *)(map + \
|
||||
dPriv->x * cpp + \
|
||||
dPriv->y * pitch); \
|
||||
GLubyte *buf = map + \
|
||||
dPriv->x * cpp + \
|
||||
dPriv->y * pitch; \
|
||||
GLuint p; \
|
||||
(void) p
|
||||
|
||||
|
@ -52,9 +52,9 @@
|
|||
GLuint zpp = savageScreen->zpp; \
|
||||
GLuint pitch = imesa->aperturePitch; \
|
||||
GLuint height = dPriv->h; \
|
||||
char *buf = (char *)(imesa->apertureBase[TARGET_DEPTH] + \
|
||||
dPriv->x * zpp + \
|
||||
dPriv->y * pitch)
|
||||
GLubyte *buf = imesa->apertureBase[TARGET_DEPTH] + \
|
||||
dPriv->x * zpp + \
|
||||
dPriv->y * pitch
|
||||
|
||||
#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS
|
||||
|
||||
|
@ -80,11 +80,11 @@
|
|||
|
||||
#define HW_WRITE_LOCK() \
|
||||
savageContextPtr imesa = SAVAGE_CONTEXT(ctx); \
|
||||
char *map = imesa->drawMap;
|
||||
GLubyte *map = imesa->drawMap;
|
||||
|
||||
#define HW_READ_LOCK() \
|
||||
savageContextPtr imesa = SAVAGE_CONTEXT(ctx); \
|
||||
char *map = imesa->readMap;
|
||||
GLubyte *map = imesa->readMap;
|
||||
|
||||
#define HW_CLIPLOOP() \
|
||||
do { \
|
||||
|
@ -233,8 +233,8 @@ static void savageDDSetBuffer(GLcontext *ctx, GLframebuffer *buffer,
|
|||
assert((bufferBit == DD_FRONT_LEFT_BIT) || (bufferBit == DD_BACK_LEFT_BIT));
|
||||
|
||||
map = (bufferBit == DD_FRONT_LEFT_BIT)
|
||||
? (char*)imesa->apertureBase[TARGET_FRONT]
|
||||
: (char*)imesa->apertureBase[TARGET_BACK];
|
||||
? imesa->apertureBase[TARGET_FRONT]
|
||||
: imesa->apertureBase[TARGET_BACK];
|
||||
|
||||
imesa->drawMap = map;
|
||||
imesa->readMap = map;
|
||||
|
|
|
@ -1710,8 +1710,8 @@ void savageDDInitState( savageContextPtr imesa ) {
|
|||
imesa->regs.s4.destCtrl.ni.dstWidthInTile =
|
||||
(imesa->savageScreen->width+31)>>5;
|
||||
}
|
||||
imesa->drawMap = (char *)imesa->apertureBase[imesa->toggle];
|
||||
imesa->readMap = (char *)imesa->apertureBase[imesa->toggle];
|
||||
imesa->drawMap = imesa->apertureBase[imesa->toggle];
|
||||
imesa->readMap = imesa->apertureBase[imesa->toggle];
|
||||
imesa->NotFirstFrame = GL_FALSE;
|
||||
|
||||
imesa->regs.s4.zBufOffset.ni.offset=imesa->savageScreen->depthOffset>>11;
|
||||
|
|
|
@ -768,7 +768,7 @@ static void savageUploadTexImages( savageContextPtr imesa, savageTexObjPtr t )
|
|||
|
||||
ofs = t->base.memBlock->ofs;
|
||||
t->setup.physAddr = imesa->savageScreen->textureOffset[heap] + ofs;
|
||||
t->bufAddr = (char *)((GLuint) imesa->savageScreen->texVirtual[heap] + ofs);
|
||||
t->bufAddr = (GLubyte *)imesa->savageScreen->texVirtual[heap] + ofs;
|
||||
imesa->dirty |= SAVAGE_UPLOAD_GLOBAL; /* FIXME: really needed? */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue