diff options
Diffstat (limited to 'src/mesa/drivers/dri')
34 files changed, 78 insertions, 76 deletions
diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index 2589c07142d..0111e36384f 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -147,10 +147,10 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit ) switch (bufferBit) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: dPriv->currentBuffer = dPriv->frontBuffer; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: dPriv->currentBuffer = dPriv->backBuffer; break; default: diff --git a/src/mesa/drivers/dri/ffb/ffb_state.c b/src/mesa/drivers/dri/ffb/ffb_state.c index eef7af4e5d3..86f92c83db7 100644 --- a/src/mesa/drivers/dri/ffb/ffb_state.c +++ b/src/mesa/drivers/dri/ffb/ffb_state.c @@ -469,21 +469,21 @@ static void ffbDDDrawBuffer(GLcontext *ctx, GLenum buffer) #endif fbc &= ~(FFB_FBC_WB_AB | FFB_FBC_RB_MASK); switch (buffer) { - case FRONT_LEFT_BIT: + case GL_FRONT: if (fmesa->back_buffer == 0) fbc |= FFB_FBC_WB_B | FFB_FBC_RB_B; else fbc |= FFB_FBC_WB_A | FFB_FBC_RB_A; break; - case BACK_LEFT_BIT: + case GL_BACK: if (fmesa->back_buffer == 0) fbc |= FFB_FBC_WB_A | FFB_FBC_RB_A; else fbc |= FFB_FBC_WB_B | FFB_FBC_RB_B; break; - case BACK_LEFT_BIT | FRONT_LEFT_BIT: + case GL_FRONT_AND_BACK: fbc |= FFB_FBC_WB_AB; break; @@ -519,14 +519,14 @@ static void ffbDDSetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, #endif fbc &= ~(FFB_FBC_RB_MASK); switch (bufferBit) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: if (fmesa->back_buffer == 0) fbc |= FFB_FBC_RB_B; else fbc |= FFB_FBC_RB_A; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: if (fmesa->back_buffer == 0) fbc |= FFB_FBC_RB_A; else @@ -534,6 +534,7 @@ static void ffbDDSetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, break; default: + _mesa_problem(ctx, "Unexpected buffer in ffbDDSetBuffer()"); return; }; diff --git a/src/mesa/drivers/dri/gamma/gamma_span.c b/src/mesa/drivers/dri/gamma/gamma_span.c index 35cbd8ba7ee..533166ddbb3 100644 --- a/src/mesa/drivers/dri/gamma/gamma_span.c +++ b/src/mesa/drivers/dri/gamma/gamma_span.c @@ -268,12 +268,14 @@ static void gammaSetBuffer( GLcontext *ctx, gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); switch ( bufferBit ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: gmesa->readOffset = 0; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: gmesa->readOffset = gmesa->driScreen->fbHeight * gmesa->driScreen->fbWidth * gmesa->gammaScreen->cpp; break; + default: + _mesa_problem(ctx, "Unexpected buffer 0x%x in gammaSetBuffer()", bufferBit); } } diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c index 780f0492e09..0822b6b8b14 100644 --- a/src/mesa/drivers/dri/i810/i810context.c +++ b/src/mesa/drivers/dri/i810/i810context.c @@ -385,13 +385,12 @@ void i810XMesaSetBackClipRects( i810ContextPtr imesa ) static void i810XMesaWindowMoved( i810ContextPtr imesa ) { switch (imesa->glCtx->Color._DrawDestMask) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: i810XMesaSetFrontClipRects( imesa ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: i810XMesaSetBackClipRects( imesa ); break; - case GL_FRONT_LEFT: default: /* glDrawBuffer(GL_NONE or GL_FRONT_AND_BACK): software fallback */ i810XMesaSetFrontClipRects( imesa ); @@ -450,10 +449,10 @@ i810UpdatePageFlipping( i810ContextPtr imesa ) int front = 0; switch (ctx->Color._DrawDestMask) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: front = 1; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: front = 0; break; default: diff --git a/src/mesa/drivers/dri/i810/i810span.c b/src/mesa/drivers/dri/i810/i810span.c index 53bd15162f8..52fb1754df6 100644 --- a/src/mesa/drivers/dri/i810/i810span.c +++ b/src/mesa/drivers/dri/i810/i810span.c @@ -123,13 +123,13 @@ static void i810SetBuffer(GLcontext *ctx, GLframebuffer *buffer, (void) buffer; switch(bufferBit) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: if ( imesa->sarea->pf_current_page == 1) imesa->readMap = imesa->i810Screen->back.map; else imesa->readMap = (char*)imesa->driScreen->pFB; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: if ( imesa->sarea->pf_current_page == 1) imesa->readMap = (char*)imesa->driScreen->pFB; else diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c index e00af656f01..4a1c15f8afc 100644 --- a/src/mesa/drivers/dri/i810/i810state.c +++ b/src/mesa/drivers/dri/i810/i810state.c @@ -285,10 +285,10 @@ void i810DrawBuffer(GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: - front=1; + case DD_FRONT_LEFT_BIT: + front = 1; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: front = 0; break; default: diff --git a/src/mesa/drivers/dri/i830/i830_context.c b/src/mesa/drivers/dri/i830/i830_context.c index a692203ce28..7f306f2110f 100644 --- a/src/mesa/drivers/dri/i830/i830_context.c +++ b/src/mesa/drivers/dri/i830/i830_context.c @@ -461,10 +461,10 @@ void i830XMesaSetBackClipRects( i830ContextPtr imesa ) static void i830XMesaWindowMoved( i830ContextPtr imesa ) { switch (imesa->glCtx->Color._DrawDestMask) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: i830XMesaSetFrontClipRects( imesa ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: i830XMesaSetBackClipRects( imesa ); break; default: diff --git a/src/mesa/drivers/dri/i830/i830_span.c b/src/mesa/drivers/dri/i830/i830_span.c index 34830bf58cb..28610923e3f 100644 --- a/src/mesa/drivers/dri/i830/i830_span.c +++ b/src/mesa/drivers/dri/i830/i830_span.c @@ -267,10 +267,10 @@ static void i830SetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, GLuint bufferBit) { i830ContextPtr imesa = I830_CONTEXT(ctx); - if (bufferBit == FRONT_LEFT_BIT) { + if (bufferBit == DD_FRONT_LEFT_BIT) { imesa->drawMap = (char *)imesa->driScreen->pFB; imesa->readMap = (char *)imesa->driScreen->pFB; - } else if (bufferBit == BACK_LEFT_BIT) { + } else if (bufferBit == DD_BACK_LEFT_BIT) { imesa->drawMap = imesa->i830Screen->back.map; imesa->readMap = imesa->i830Screen->back.map; } else { diff --git a/src/mesa/drivers/dri/i830/i830_state.c b/src/mesa/drivers/dri/i830/i830_state.c index 0fde9095719..a8edf854264 100644 --- a/src/mesa/drivers/dri/i830/i830_state.c +++ b/src/mesa/drivers/dri/i830/i830_state.c @@ -831,14 +831,14 @@ static void i830DrawBuffer(GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: I830_FIREVERTICES(imesa); I830_STATECHANGE(imesa, I830_UPLOAD_BUFFERS); imesa->BufferSetup[I830_DESTREG_CBUFADDR] = imesa->i830Screen->fbOffset; i830XMesaSetFrontClipRects( imesa ); FALLBACK( imesa, I830_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: I830_FIREVERTICES(imesa); I830_STATECHANGE(imesa, I830_UPLOAD_BUFFERS); imesa->BufferSetup[I830_DESTREG_CBUFADDR] = diff --git a/src/mesa/drivers/dri/mach64/mach64_lock.c b/src/mesa/drivers/dri/mach64/mach64_lock.c index 465bcb3ab87..f95c1595cd1 100644 --- a/src/mesa/drivers/dri/mach64/mach64_lock.c +++ b/src/mesa/drivers/dri/mach64/mach64_lock.c @@ -69,7 +69,7 @@ void mach64GetLock( mach64ContextPtr mmesa, GLuint flags ) if ( mmesa->lastStamp != dPriv->lastStamp ) { mmesa->lastStamp = dPriv->lastStamp; - if (mmesa->glCtx->Color._DrawDestMask == BACK_LEFT_BIT) + if (mmesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT) mach64SetCliprects( mmesa->glCtx, GL_BACK_LEFT ); else mach64SetCliprects( mmesa->glCtx, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/mach64/mach64_span.c b/src/mesa/drivers/dri/mach64/mach64_span.c index 4c668ba90ee..3e553a90941 100644 --- a/src/mesa/drivers/dri/mach64/mach64_span.c +++ b/src/mesa/drivers/dri/mach64/mach64_span.c @@ -200,15 +200,15 @@ static void mach64DDSetBuffer( GLcontext *ctx, mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); switch ( bufferBit ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: if (MACH64_DEBUG & DEBUG_VERBOSE_MSG) - fprintf(stderr,"%s: FRONT_LEFT_BIT\n", __FUNCTION__); + fprintf(stderr,"%s: DD_FRONT_LEFT_BIT\n", __FUNCTION__); mmesa->drawOffset = mmesa->readOffset = mmesa->mach64Screen->frontOffset; mmesa->drawPitch = mmesa->readPitch = mmesa->mach64Screen->frontPitch; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: if (MACH64_DEBUG & DEBUG_VERBOSE_MSG) - fprintf(stderr,"%s: BACK_LEFT_BIT\n", __FUNCTION__); + fprintf(stderr,"%s: DD_BACK_LEFT_BIT\n", __FUNCTION__); mmesa->drawOffset = mmesa->readOffset = mmesa->mach64Screen->backOffset; mmesa->drawPitch = mmesa->readPitch = mmesa->mach64Screen->backPitch; break; diff --git a/src/mesa/drivers/dri/mach64/mach64_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c index 9c37d854909..f81e91a3c9b 100644 --- a/src/mesa/drivers/dri/mach64/mach64_state.c +++ b/src/mesa/drivers/dri/mach64/mach64_state.c @@ -730,17 +730,17 @@ static void mach64DDDrawBuffer( GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: FALLBACK( mmesa, MACH64_FALLBACK_DRAW_BUFFER, GL_FALSE ); mach64SetCliprects( ctx, GL_FRONT_LEFT ); if (MACH64_DEBUG & DEBUG_VERBOSE_MSG) - fprintf(stderr,"%s: FRONT_LEFT_BIT\n", __FUNCTION__); + fprintf(stderr,"%s: DD_FRONT_LEFT_BIT\n", __FUNCTION__); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: FALLBACK( mmesa, MACH64_FALLBACK_DRAW_BUFFER, GL_FALSE ); mach64SetCliprects( ctx, GL_BACK_LEFT ); if (MACH64_DEBUG & DEBUG_VERBOSE_MSG) - fprintf(stderr,"%s: BACK_LEFT_BIT\n", __FUNCTION__); + fprintf(stderr,"%s: DD_BACK_LEFT_BIT\n", __FUNCTION__); break; default: /* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */ diff --git a/src/mesa/drivers/dri/mga/mgaspan.c b/src/mesa/drivers/dri/mga/mgaspan.c index c8a55d4cd15..a72c4d7fb0f 100644 --- a/src/mesa/drivers/dri/mga/mgaspan.c +++ b/src/mesa/drivers/dri/mga/mgaspan.c @@ -244,9 +244,9 @@ static void mgaDDSetBuffer(GLcontext *ctx, GLframebuffer *buffer, mgaContextPtr mmesa = MGA_CONTEXT(ctx); unsigned int offset; - assert( (bufferBit == FRONT_LEFT_BIT) || (bufferBit == BACK_LEFT_BIT) ); + assert((bufferBit == DD_FRONT_LEFT_BIT) || (bufferBit == DD_BACK_LEFT_BIT)); - offset = (bufferBit == FRONT_LEFT_BIT) + offset = (bufferBit == DD_FRONT_LEFT_BIT) ? mmesa->mgaScreen->frontOffset : mmesa->mgaScreen->backOffset; diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c index 56d9d77ca51..fce083689b1 100644 --- a/src/mesa/drivers/dri/mga/mgastate.c +++ b/src/mesa/drivers/dri/mga/mgastate.c @@ -824,14 +824,14 @@ static void mgaDDDrawBuffer(GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: mmesa->setup.dstorg = mmesa->mgaScreen->frontOffset; mmesa->dirty |= MGA_UPLOAD_CONTEXT; mmesa->draw_buffer = MGA_FRONT; mgaXMesaSetFrontClipRects( mmesa ); FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: mmesa->setup.dstorg = mmesa->mgaScreen->backOffset; mmesa->draw_buffer = MGA_BACK; mmesa->dirty |= MGA_UPLOAD_CONTEXT; diff --git a/src/mesa/drivers/dri/r128/r128_lock.c b/src/mesa/drivers/dri/r128/r128_lock.c index 47ad1c8246d..8508f7dfe8a 100644 --- a/src/mesa/drivers/dri/r128/r128_lock.c +++ b/src/mesa/drivers/dri/r128/r128_lock.c @@ -52,7 +52,7 @@ r128UpdatePageFlipping( r128ContextPtr rmesa ) rmesa->doPageFlip = rmesa->sarea->pfAllowPageFlip; - use_back = (rmesa->glCtx->Color._DrawDestMask == BACK_LEFT_BIT); + use_back = (rmesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT); use_back ^= (rmesa->sarea->pfCurrentPage == 1); if ( R128_DEBUG & DEBUG_VERBOSE_API ) diff --git a/src/mesa/drivers/dri/r128/r128_span.c b/src/mesa/drivers/dri/r128/r128_span.c index c6f31959423..db2ec44fbf2 100644 --- a/src/mesa/drivers/dri/r128/r128_span.c +++ b/src/mesa/drivers/dri/r128/r128_span.c @@ -390,7 +390,7 @@ static void r128DDSetBuffer( GLcontext *ctx, r128ContextPtr rmesa = R128_CONTEXT(ctx); switch ( bufferBit ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: if ( rmesa->sarea->pfCurrentPage == 1 ) { rmesa->drawOffset = rmesa->readOffset = rmesa->r128Screen->backOffset; rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->backPitch; @@ -399,7 +399,7 @@ static void r128DDSetBuffer( GLcontext *ctx, rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->frontPitch; } break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: if ( rmesa->sarea->pfCurrentPage == 1 ) { rmesa->drawOffset = rmesa->readOffset = rmesa->r128Screen->frontOffset; rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->frontPitch; diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c index ec3a7965e55..e27e542a7d2 100644 --- a/src/mesa/drivers/dri/r128/r128_state.c +++ b/src/mesa/drivers/dri/r128/r128_state.c @@ -688,10 +688,10 @@ static void r128DDDrawBuffer( GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: FALLBACK( rmesa, R128_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: FALLBACK( rmesa, R128_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; default: diff --git a/src/mesa/drivers/dri/r200/r200_lock.c b/src/mesa/drivers/dri/r200/r200_lock.c index 794a29972ae..1700d31e169 100644 --- a/src/mesa/drivers/dri/r200/r200_lock.c +++ b/src/mesa/drivers/dri/r200/r200_lock.c @@ -53,7 +53,7 @@ r200UpdatePageFlipping( r200ContextPtr rmesa ) int use_back; rmesa->doPageFlip = rmesa->sarea->pfState; - use_back = (rmesa->glCtx->Color._DrawDestMask == BACK_LEFT_BIT); + use_back = (rmesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT); use_back ^= (rmesa->sarea->pfCurrentPage == 1); if (use_back) { @@ -101,7 +101,7 @@ void r200GetLock( r200ContextPtr rmesa, GLuint flags ) if ( rmesa->lastStamp != dPriv->lastStamp ) { r200UpdatePageFlipping( rmesa ); - if (rmesa->glCtx->Color._DrawDestMask == BACK_LEFT_BIT) + if (rmesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT) r200SetCliprects( rmesa, GL_BACK_LEFT ); else r200SetCliprects( rmesa, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/r200/r200_span.c b/src/mesa/drivers/dri/r200/r200_span.c index 7e48a9d5afb..e1ad976ce3b 100644 --- a/src/mesa/drivers/dri/r200/r200_span.c +++ b/src/mesa/drivers/dri/r200/r200_span.c @@ -301,7 +301,7 @@ static void r200SetBuffer( GLcontext *ctx, r200ContextPtr rmesa = R200_CONTEXT(ctx); switch ( bufferBit ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: if ( rmesa->doPageFlip && rmesa->sarea->pfCurrentPage == 1 ) { rmesa->state.pixel.readOffset = rmesa->r200Screen->backOffset; rmesa->state.pixel.readPitch = rmesa->r200Screen->backPitch; @@ -314,7 +314,7 @@ static void r200SetBuffer( GLcontext *ctx, rmesa->state.color.drawPitch = rmesa->r200Screen->frontPitch; } break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: if ( rmesa->doPageFlip && rmesa->sarea->pfCurrentPage == 1 ) { rmesa->state.pixel.readOffset = rmesa->r200Screen->frontOffset; rmesa->state.pixel.readPitch = rmesa->r200Screen->frontPitch; diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index 478531f5b5e..1dd352a53d5 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -1674,11 +1674,11 @@ static void r200DrawBuffer( GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: FALLBACK( rmesa, R200_FALLBACK_DRAW_BUFFER, GL_FALSE ); r200SetCliprects( rmesa, GL_FRONT_LEFT ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: FALLBACK( rmesa, R200_FALLBACK_DRAW_BUFFER, GL_FALSE ); r200SetCliprects( rmesa, GL_BACK_LEFT ); break; diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c index 4399c86fa0a..6d51b886d80 100644 --- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c +++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c @@ -844,7 +844,7 @@ void radeonCopyBuffer( const __DRIdrawablePrivate *dPriv ) rmesa = (radeonContextPtr) dPriv->driContextPriv->driverPrivate; if ( RADEON_DEBUG & DEBUG_IOCTL ) { - fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, rmesa->glCtx ); + fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, (void *) rmesa->glCtx ); } RADEON_FIREVERTICES( rmesa ); diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c index 033a45efb2c..0b58589a38f 100644 --- a/src/mesa/drivers/dri/radeon/radeon_lock.c +++ b/src/mesa/drivers/dri/radeon/radeon_lock.c @@ -56,7 +56,7 @@ radeonUpdatePageFlipping( radeonContextPtr rmesa ) rmesa->doPageFlip = rmesa->sarea->pfState; - use_back = (rmesa->glCtx->Color._DrawDestMask == BACK_LEFT_BIT); + use_back = (rmesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT); use_back ^= (rmesa->sarea->pfCurrentPage == 1); if ( RADEON_DEBUG & DEBUG_VERBOSE ) @@ -108,7 +108,7 @@ void radeonGetLock( radeonContextPtr rmesa, GLuint flags ) if ( rmesa->lastStamp != dPriv->lastStamp ) { radeonUpdatePageFlipping( rmesa ); - if (rmesa->glCtx->Color._DrawDestMask == BACK_LEFT_BIT) + if (rmesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT) radeonSetCliprects( rmesa, GL_BACK_LEFT ); else radeonSetCliprects( rmesa, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index 029d7cd8eef..5fa02fa97ca 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -301,7 +301,7 @@ static void radeonSetBuffer( GLcontext *ctx, radeonContextPtr rmesa = RADEON_CONTEXT(ctx); switch ( bufferBit ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: if ( rmesa->sarea->pfCurrentPage == 1 ) { rmesa->state.pixel.readOffset = rmesa->radeonScreen->backOffset; rmesa->state.pixel.readPitch = rmesa->radeonScreen->backPitch; @@ -314,7 +314,7 @@ static void radeonSetBuffer( GLcontext *ctx, rmesa->state.color.drawPitch = rmesa->radeonScreen->frontPitch; } break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: if ( rmesa->sarea->pfCurrentPage == 1 ) { rmesa->state.pixel.readOffset = rmesa->radeonScreen->frontOffset; rmesa->state.pixel.readPitch = rmesa->radeonScreen->frontPitch; diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 0d5d2818cdb..3bd2a88d420 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -1613,11 +1613,11 @@ static void radeonDrawBuffer( GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: FALLBACK( rmesa, RADEON_FALLBACK_DRAW_BUFFER, GL_FALSE ); radeonSetCliprects( rmesa, GL_FRONT_LEFT ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: FALLBACK( rmesa, RADEON_FALLBACK_DRAW_BUFFER, GL_FALSE ); radeonSetCliprects( rmesa, GL_BACK_LEFT ); break; diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index c7b31df2c68..f07d4aadd38 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -592,10 +592,10 @@ static void savageXMesaWindowMoved( savageContextPtr imesa ) fprintf(stderr, "savageXMesaWindowMoved\n\n"); switch (imesa->glCtx->Color._DrawDestMask) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: savageXMesaSetFrontClipRects( imesa ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: savageXMesaSetBackClipRects( imesa ); break; default: diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c index aa13cfcb1d1..0369988ad24 100644 --- a/src/mesa/drivers/dri/savage/savagespan.c +++ b/src/mesa/drivers/dri/savage/savagespan.c @@ -225,9 +225,9 @@ static void savageDDSetBuffer(GLcontext *ctx, GLframebuffer *buffer, savageContextPtr imesa = SAVAGE_CONTEXT(ctx); char *map; - assert( (bufferBit == FRONT_LEFT_BIT) || (bufferBit == BACK_LEFT_BIT) ); + assert((bufferBit == DD_FRONT_LEFT_BIT) || (bufferBit == DD_BACK_LEFT_BIT)); - map = (bufferBit == FRONT_LEFT_BIT) + map = (bufferBit == DD_FRONT_LEFT_BIT) ? (char*)imesa->apertureBase[TARGET_FRONT] : (char*)imesa->apertureBase[TARGET_BACK]; diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c index 6b297448d59..b32b58ab878 100644 --- a/src/mesa/drivers/dri/savage/savagestate.c +++ b/src/mesa/drivers/dri/savage/savagestate.c @@ -639,7 +639,7 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: imesa->IsDouble = GL_FALSE; if(imesa->IsFullScreen) @@ -657,7 +657,7 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode ) savageXMesaSetFrontClipRects( imesa ); FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: imesa->IsDouble = GL_TRUE; imesa->drawMap = (char *)imesa->apertureBase[TARGET_BACK]; imesa->readMap = (char *)imesa->apertureBase[TARGET_BACK]; @@ -1776,7 +1776,7 @@ void savageDDInitState( savageContextPtr imesa ) { imesa->regs.s4.zBufOffset.ni.zDepthSelect = 1; } - if (imesa->glCtx->Color._DrawDestMask == BACK_LEFT_BIT) { + if (imesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT) { if(imesa->IsFullScreen) { imesa->toggle = TARGET_BACK; diff --git a/src/mesa/drivers/dri/sis/sis_span.c b/src/mesa/drivers/dri/sis/sis_span.c index 05e1777891c..1342d539223 100644 --- a/src/mesa/drivers/dri/sis/sis_span.c +++ b/src/mesa/drivers/dri/sis/sis_span.c @@ -203,11 +203,11 @@ static void sisDDSetBuffer( GLcontext *ctx, sisContextPtr smesa = SIS_CONTEXT(ctx); switch ( bufferBit ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: smesa->drawOffset = smesa->readOffset = smesa->frontOffset; smesa->drawPitch = smesa->readPitch = smesa->frontPitch; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: smesa->drawOffset = smesa->readOffset = smesa->backOffset; smesa->drawPitch = smesa->readPitch = smesa->backPitch; break; diff --git a/src/mesa/drivers/dri/sis/sis_state.c b/src/mesa/drivers/dri/sis/sis_state.c index 6dc002171d5..ec911875199 100644 --- a/src/mesa/drivers/dri/sis/sis_state.c +++ b/src/mesa/drivers/dri/sis/sis_state.c @@ -514,8 +514,8 @@ void sisDDDrawBuffer( GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: - case BACK_LEFT_BIT: + case DD_FRONT_LEFT_BIT: + case DD_BACK_LEFT_BIT: FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; default: diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c index e49c49e72d2..21ec99c878f 100644 --- a/src/mesa/drivers/dri/sis/sis_tris.c +++ b/src/mesa/drivers/dri/sis/sis_tris.c @@ -792,7 +792,7 @@ static void sisRenderStart( GLcontext *ctx ) */ sisCheckTexSizes( ctx ); - if (ctx->Color._DrawDestMask == FRONT_LEFT_BIT && + if (ctx->Color._DrawDestMask == DD_FRONT_LEFT_BIT && smesa->driDrawable->numClipRects != 0) { multipass_cliprect(ctx, 0); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_render.c b/src/mesa/drivers/dri/tdfx/tdfx_render.c index 84d919591b4..e15b38034e9 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_render.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_render.c @@ -275,7 +275,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear); FX_grColorMaskv_NoLock(ctx, true4); - if (ctx->Color._DrawDestMask & FRONT_LEFT_BIT) + if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); if (!ctx->Depth.Test || !ctx->Depth.Mask) fxMesa->Glide.grDepthMask(FXFALSE); @@ -295,7 +295,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grDepthMask(FXTRUE); } FX_grColorMaskv_NoLock(ctx, true4); - if (ctx->Color._DrawDestMask & FRONT_LEFT_BIT) + if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); } } diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c index 4207d05dd39..43fcb90fd23 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_span.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c @@ -1314,10 +1314,10 @@ static void tdfxDDSetBuffer( GLcontext *ctx, (void) buffer; switch ( bufferBit ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; break; default: diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c index 5e59b91f80d..dffcccd9a21 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_state.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c @@ -1011,12 +1011,12 @@ static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode ) * _DrawDestMask is easier to cope with than <mode>. */ switch ( ctx->Color._DrawDestMask ) { - case FRONT_LEFT_BIT: + case DD_FRONT_LEFT_BIT: fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; fxMesa->new_state |= TDFX_NEW_RENDER; FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; - case BACK_LEFT_BIT: + case DD_BACK_LEFT_BIT: fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; fxMesa->new_state |= TDFX_NEW_RENDER; FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE ); diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c index af1bcf5579e..fcb97718758 100644 --- a/src/mesa/drivers/dri/unichrome/via_span.c +++ b/src/mesa/drivers/dri/unichrome/via_span.c @@ -327,13 +327,13 @@ static void viaSetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, #ifdef DEBUG if (VIA_DEBUG) fprintf(stderr, "%s in\n", __FUNCTION__); #endif - if (bufferBit == FRONT_LEFT_BIT) { + if (bufferBit == DD_FRONT_LEFT_BIT) { vmesa->drawMap = (char *)vmesa->driScreen->pFB; vmesa->readMap = (char *)vmesa->driScreen->pFB; vmesa->drawPitch = vmesa->front.pitch; vmesa->readPitch = vmesa->front.pitch; } - else if (bufferBit == BACK_LEFT_BIT) { + else if (bufferBit == DD_BACK_LEFT_BIT) { vmesa->drawMap = vmesa->back.map; vmesa->readMap = vmesa->back.map; vmesa->drawPitch = vmesa->back.pitch; |