summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/tdfx
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2004-04-26 10:10:22 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2004-04-26 10:10:22 +0000
commit462183fe4cb6df6d90632d9e2cee881c8d26b1cb (patch)
tree0fb5d1c17d80026bec0fe3c2e0449fe30ea9e69e /src/mesa/drivers/dri/tdfx
parent08fa6de85035c428d77cb88b11a4638b706794b5 (diff)
bring over build fixes from stable branch
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_span.c21
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texman.c2
3 files changed, 14 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index 48cff3f02c..679c2d7560 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -118,7 +118,7 @@ static GLboolean
tdfxInitDriver( __DRIscreenPrivate *sPriv )
{
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
- fprintf( stderr, "%s( %p )\n", __FUNCTION__, sPriv );
+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)sPriv );
}
/* Check the DRI externsion version */
@@ -195,7 +195,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
GLframebuffer *mesaBuffer;
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
- fprintf( stderr, "%s( %p )\n", __FUNCTION__, driDrawPriv );
+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driDrawPriv );
}
mesaBuffer = (GLframebuffer *) driDrawPriv->driverPrivate;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c
index 43fcb90fd2..0d2bc811e0 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_span.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c
@@ -572,14 +572,6 @@ GetFbParams(tdfxContextPtr fxMesa,
*
* Recall that x and y are screen coordinates.
*/
-#define GET_FB_DATA(ReadParamsp, type, x, y) \
- (((x) < (ReadParamsp)->firstWrappedX) \
- ? (((type *)((ReadParamsp)->lfbPtr)) \
- [(y) * ((ReadParamsp)->LFBStrideInElts) \
- + (x)]) \
- : (((type *)((ReadParamsp)->lfbWrapPtr)) \
- [((y)) * ((ReadParamsp)->LFBStrideInElts) \
- + ((x) - (ReadParamsp)->firstWrappedX)]))
#define GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \
(((type *)((ReadParamsp)->lfbPtr)) \
[(y) * ((ReadParamsp)->LFBStrideInElts) \
@@ -588,12 +580,21 @@ GetFbParams(tdfxContextPtr fxMesa,
(((type *)((ReadParamsp)->lfbWrapPtr)) \
[((y)) * ((ReadParamsp)->LFBStrideInElts) \
+ ((x) - (ReadParamsp)->firstWrappedX)])
-#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \
- (GET_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
+#define GET_FB_DATA(ReadParamsp, type, x, y) \
+ (((x) < (ReadParamsp)->firstWrappedX) \
+ ? GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \
+ : GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y))
#define PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
#define PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value) \
(GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) = (type)(value))
+#define PUT_FB_DATA(ReadParamsp, type, x, y, value) \
+ do { \
+ if ((x) < (ReadParamsp)->firstWrappedX) \
+ PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value); \
+ else \
+ PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value); \
+ } while (0)
static void
tdfxDDWriteDepthSpan(GLcontext * ctx,
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texman.c b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
index 9bfd5de5f9..6f303aee66 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texman.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
@@ -880,7 +880,7 @@ tdfxTMMoveOutTM_NoLock( tdfxContextPtr fxMesa, struct gl_texture_object *tObj )
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
if (MESA_VERBOSE & VERBOSE_DRIVER) {
- fprintf(stderr, "fxmesa: %s(%p (%d))\n", __FUNCTION__, tObj, tObj->Name);
+ fprintf(stderr, "fxmesa: %s(%p (%d))\n", __FUNCTION__, (void *)tObj, tObj->Name);
}
/*