summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/allegro/amesa.c4
-rw-r--r--src/mesa/drivers/dri/fb/fb_dri.c4
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_state.c11
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_span.c6
-rw-r--r--src/mesa/drivers/dri/i810/i810context.c9
-rw-r--r--src/mesa/drivers/dri/i810/i810span.c4
-rw-r--r--src/mesa/drivers/dri/i810/i810state.c6
-rw-r--r--src/mesa/drivers/dri/i830/i830_context.c4
-rw-r--r--src/mesa/drivers/dri/i830/i830_span.c4
-rw-r--r--src/mesa/drivers/dri/i830/i830_state.c4
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_lock.c2
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_span.c8
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_state.c8
-rw-r--r--src/mesa/drivers/dri/mga/mgaspan.c4
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_lock.c2
-rw-r--r--src/mesa/drivers/dri/r128/r128_span.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_state.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_lock.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_span.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lock.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c4
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c4
-rw-r--r--src/mesa/drivers/dri/savage/savagespan.c4
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c6
-rw-r--r--src/mesa/drivers/dri/sis/sis_span.c4
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.c4
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.c2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_render.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_span.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_state.c4
-rw-r--r--src/mesa/drivers/dri/unichrome/via_span.c4
-rw-r--r--src/mesa/drivers/fbdev/glfbdev.c4
-rw-r--r--src/mesa/drivers/ggi/ggimesa.c4
-rw-r--r--src/mesa/drivers/glide/fxdd.c7
-rw-r--r--src/mesa/drivers/glide/fxddspan.c4
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c2
-rw-r--r--src/mesa/drivers/x11/fakeglx.c23
-rw-r--r--src/mesa/drivers/x11/xm_api.c3
-rw-r--r--src/mesa/drivers/x11/xm_dd.c15
-rw-r--r--src/mesa/drivers/x11/xm_line.c2
-rw-r--r--src/mesa/drivers/x11/xm_tri.c2
45 files changed, 125 insertions, 99 deletions
diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c
index 14621617813..92fd1b70683 100644
--- a/src/mesa/drivers/allegro/amesa.c
+++ b/src/mesa/drivers/allegro/amesa.c
@@ -117,10 +117,10 @@ static GLboolean set_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bit)
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
GLboolean ok = GL_TRUE;
- if (bit == FRONT_LEFT_BIT)
+ if (bit == DD_FRONT_LEFT_BIT)
context->Buffer->Active = context->Buffer->Screen;
- else if (bit == BACK_LEFT)
+ else if (bit == DD_BACK_LEFT)
{
if (context->Buffer->Background)
context->Buffer->Active = context->Buffer->Background;
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;
diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c
index 15ddbca9ed8..cfb6a70f60b 100644
--- a/src/mesa/drivers/fbdev/glfbdev.c
+++ b/src/mesa/drivers/fbdev/glfbdev.c
@@ -159,10 +159,10 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit )
GLFBDevBufferPtr fbdevbuf = GLFBDEV_BUFFER(buffer);
fbdevctx->curBuffer = fbdevbuf;
switch (bufferBit) {
- case FRONT_LEFT_BIT:
+ case DD_FRONT_LEFT_BIT:
fbdevbuf->curBottom = fbdevbuf->frontBottom;
break;
- case BACK_LEFT_BIT:
+ case DD_BACK_LEFT_BIT:
fbdevbuf->curBottom = fbdevbuf->backBottom;
break;
default:
diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c
index 8825c47162a..8a2f44a558c 100644
--- a/src/mesa/drivers/ggi/ggimesa.c
+++ b/src/mesa/drivers/ggi/ggimesa.c
@@ -160,7 +160,7 @@ static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLframebuffer *buffer, GLuint b
printf("set read %d\n", bufferBit);
GGIMESADPRINT_CORE("gl_ggiSetBuffer() called\n");
- if (bufferBit == FRONT_LEFT_BIT)
+ if (bufferBit == DD_FRONT_LEFT_BIT)
{
ggiSetReadFrame(ggi_ctx->ggi_visual,
ggiGetDisplayFrame(ggi_ctx->ggi_visual));
@@ -168,7 +168,7 @@ static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLframebuffer *buffer, GLuint b
ggiGetDisplayFrame(ggi_ctx->ggi_visual));
return GL_TRUE;
}
- else if (bufferBit == BACK_LEFT_BIT)
+ else if (bufferBit == DD_BACK_LEFT_BIT)
{
ggiSetReadFrame(ggi_ctx->ggi_visual,
ggiGetDisplayFrame(ggi_ctx->ggi_visual)?0 : 1);
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index 8d40d8476a0..245654ca4c7 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -380,7 +380,7 @@ static void fxDDClear( GLcontext *ctx,
fxMesa->clearA,
clearD);
fxSetupColorMask(ctx);
- if (ctx->Color._DrawDestMask & FRONT_LEFT_BIT) {
+ if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) {
grRenderBuffer(GR_BUFFER_FRONTBUFFER);
}
if (!fxMesa->unitsState.depthTestEnabled) {
@@ -401,7 +401,7 @@ static void fxDDClear( GLcontext *ctx,
grDepthMask(FXTRUE);
}
fxSetupColorMask(ctx);
- if (ctx->Color._DrawDestMask & FRONT_LEFT_BIT) {
+ if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) {
grRenderBuffer(GR_BUFFER_FRONTBUFFER);
}
}
@@ -1552,7 +1552,8 @@ fx_check_IsInHardware(GLcontext * ctx)
return FX_FALLBACK_STENCIL;
}
- if (ctx->Color._DrawDestMask != FRONT_LEFT_BIT && ctx->Color._DrawDestMask != BACK_LEFT_BIT) {
+ if (ctx->Color._DrawDestMask != DD_FRONT_LEFT_BIT &&
+ ctx->Color._DrawDestMask != DD_BACK_LEFT_BIT) {
return FX_FALLBACK_DRAW_BUFFER;
}
diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c
index 4b9b2123b4d..4eacfc0b5d3 100644
--- a/src/mesa/drivers/glide/fxddspan.c
+++ b/src/mesa/drivers/glide/fxddspan.c
@@ -557,11 +557,11 @@ fxDDSetBuffer(GLcontext * ctx, GLframebuffer * buffer, GLuint bufferBit)
fprintf(stderr, "fxDDSetBuffer(%x)\n", (int)bufferBit);
}
- if (bufferBit == FRONT_LEFT_BIT) {
+ if (bufferBit == DD_FRONT_LEFT_BIT) {
fxMesa->currentFB = GR_BUFFER_FRONTBUFFER;
grRenderBuffer(fxMesa->currentFB);
}
- else if (bufferBit == BACK_LEFT_BIT) {
+ else if (bufferBit == DD_BACK_LEFT_BIT) {
fxMesa->currentFB = GR_BUFFER_BACKBUFFER;
grRenderBuffer(fxMesa->currentFB);
}
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 464ca7381a2..a8e6b12832d 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -133,7 +133,7 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit )
{
/* separate read buffer not supported */
ASSERT(buffer == ctx->DrawBuffer);
- ASSERT(bufferBit == FRONT_LEFT_BIT);
+ ASSERT(bufferBit == DD_FRONT_LEFT_BIT);
}
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 4535f8cae00..47882114cfc 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -252,7 +252,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
GLint depth_size, GLint stencil_size,
GLint accumRedSize, GLint accumGreenSize,
GLint accumBlueSize, GLint accumAlphaSize,
- GLint level )
+ GLint level, GLint numAuxBuffers )
{
GLboolean ximageFlag = GL_TRUE;
XMesaVisual xmvis;
@@ -287,6 +287,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
XMesaVisual v = VisualTable[i];
if (v->display == dpy
&& v->mesa_visual.level == level
+ && v->mesa_visual.numAuxBuffers == numAuxBuffers
&& v->ximage_flag == ximageFlag
&& v->mesa_visual.rgbMode == rgbFlag
&& v->mesa_visual.doubleBufferMode == dbFlag
@@ -327,6 +328,8 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
/* add xmvis to the list */
VisualTable[NumVisuals] = xmvis;
NumVisuals++;
+ /* XXX minor hack */
+ xmvis->mesa_visual.numAuxBuffers = numAuxBuffers;
}
return xmvis;
}
@@ -357,7 +360,8 @@ create_glx_visual( Display *dpy, XVisualInfo *visinfo )
0, /* depth bits */
0, /* stencil bits */
0,0,0,0, /* accum bits */
- vislevel /* level */
+ vislevel, /* level */
+ 0 /* numAux */
);
}
else if (is_usable_visual( visinfo )) {
@@ -374,7 +378,8 @@ create_glx_visual( Display *dpy, XVisualInfo *visinfo )
0 * sizeof(GLaccum), /* g */
0 * sizeof(GLaccum), /* b */
0 * sizeof(GLaccum), /* a */
- 0 /* level */
+ 0, /* level */
+ 0 /* numAux */
);
}
else {
@@ -392,7 +397,8 @@ create_glx_visual( Display *dpy, XVisualInfo *visinfo )
8 * sizeof(GLaccum), /* g */
8 * sizeof(GLaccum), /* b */
8 * sizeof(GLaccum), /* a */
- 0 /* level */
+ 0, /* level */
+ 0 /* numAux */
);
}
}
@@ -925,6 +931,7 @@ static XMesaVisual choose_visual( Display *dpy, int screen, const int *list,
GLint caveat = DONT_CARE;
XMesaVisual xmvis = NULL;
int desiredVisualID = -1;
+ int numAux = 0;
parselist = list;
@@ -957,7 +964,9 @@ static XMesaVisual choose_visual( Display *dpy, int screen, const int *list,
case GLX_AUX_BUFFERS:
/* ignore */
parselist++;
- parselist++;
+ numAux = *parselist++;
+ if (numAux > MAX_AUX_BUFFERS)
+ return NULL;
break;
case GLX_RED_SIZE:
parselist++;
@@ -1186,7 +1195,7 @@ static XMesaVisual choose_visual( Display *dpy, int screen, const int *list,
xmvis = save_glx_visual( dpy, vis, rgb_flag, alpha_flag, double_flag,
stereo_flag, depth_size, stencil_size,
accumRedSize, accumGreenSize,
- accumBlueSize, accumAlphaSize, level );
+ accumBlueSize, accumAlphaSize, level, numAux );
}
return xmvis;
@@ -1566,7 +1575,7 @@ get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig )
*value = (int) xmvis->mesa_visual.stereoMode;
return 0;
case GLX_AUX_BUFFERS:
- *value = (int) False;
+ *value = xmvis->mesa_visual.numAuxBuffers;
return 0;
case GLX_RED_SIZE:
*value = xmvis->mesa_visual.redBits;
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 189fde636e8..da2371eb7cc 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1602,6 +1602,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
accum_blue_size, accum_alpha_size,
0 );
+ /* XXX minor hack */
v->mesa_visual.level = level;
return v;
}
@@ -1789,6 +1790,8 @@ XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v, XMesaWindow w,
v->mesa_visual.stencilBits > 0,
v->mesa_visual.accumRedBits > 0,
v->mesa_visual.alphaBits > 0 );
+ /* XXX hack */
+ b->mesa_buffer.UseSoftwareAuxBuffers = GL_TRUE;
if (!initialize_visual_and_buffer( client, v, b, v->mesa_visual.rgbMode,
(XMesaDrawable)w, b->cmap )) {
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 1178b71b74f..b58188e2003 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -41,6 +41,7 @@
#include "xmesaP.h"
#include "array_cache/acache.h"
#include "swrast/swrast.h"
+#include "swrast/s_auxbuffer.h"
#include "swrast/s_context.h"
#include "swrast/s_drawpix.h"
#include "swrast/s_alphabuf.h"
@@ -167,10 +168,11 @@ xmesa_set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit )
/*
* Now determine front vs back color buffer.
*/
- if (bufferBit == FRONT_LEFT_BIT) {
+ if (bufferBit == DD_FRONT_LEFT_BIT) {
target->buffer = target->frontbuffer;
+ xmesa_update_span_funcs(ctx);
}
- else if (bufferBit == BACK_LEFT_BIT) {
+ else if (bufferBit == DD_BACK_LEFT_BIT) {
ASSERT(target->db_state);
if (target->backpixmap) {
/* back buffer is a pixmap */
@@ -184,12 +186,15 @@ xmesa_set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit )
/* No back buffer!!!! Must be out of memory, use front buffer */
target->buffer = target->frontbuffer;
}
+ xmesa_update_span_funcs(ctx);
}
+ else if (bufferBit & (DD_AUX0_BIT | DD_AUX1_BIT | DD_AUX2_BIT | DD_AUX3_BIT)) {
+ _swrast_use_aux_buffer(ctx, buffer, bufferBit);
+ }
else {
_mesa_problem(ctx, "invalid buffer 0x%x in set_buffer() in xm_dd.c");
return;
}
- xmesa_update_span_funcs(ctx);
}
@@ -1105,7 +1110,9 @@ void xmesa_update_state( GLcontext *ctx, GLuint new_state )
break;
}
- xmesa_update_span_funcs(ctx);
+ if (ctx->Color._DrawDestMask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) {
+ xmesa_update_span_funcs(ctx);
+ }
}
diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c
index 342528dbefa..a5352d61474 100644
--- a/src/mesa/drivers/x11/xm_line.c
+++ b/src/mesa/drivers/x11/xm_line.c
@@ -492,6 +492,8 @@ static swrast_line_func get_line_func( GLcontext *ctx )
SWcontext *swrast = SWRAST_CONTEXT(ctx);
int depth = GET_VISUAL_DEPTH(xmesa->xm_visual);
+ if ((ctx->Color._DrawDestMask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) ==0)
+ return (swrast_line_func) NULL;
if (ctx->RenderMode != GL_RENDER) return (swrast_line_func) NULL;
if (ctx->Line.SmoothFlag) return (swrast_line_func) NULL;
if (ctx->Texture._EnabledUnits) return (swrast_line_func) NULL;
diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c
index 868bca4937f..f018a6acacb 100644
--- a/src/mesa/drivers/x11/xm_tri.c
+++ b/src/mesa/drivers/x11/xm_tri.c
@@ -1313,6 +1313,8 @@ static swrast_tri_func get_triangle_func( GLcontext *ctx )
triFuncName = NULL;
#endif
+ if ((ctx->Color._DrawDestMask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) ==0)
+ return (swrast_tri_func) NULL;
if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL;
if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL;
if (ctx->Texture._EnabledUnits) return (swrast_tri_func) NULL;