diff options
Diffstat (limited to 'src/mesa/drivers')
35 files changed, 66 insertions, 66 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index a51f6505f39..643a8c1b017 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -126,6 +126,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->ColorMaterial = NULL; driver->CullFace = NULL; driver->DrawBuffer = _swrast_DrawBuffer; + driver->DrawBuffers = _swrast_DrawBuffers; driver->FrontFace = NULL; driver->DepthFunc = NULL; driver->DepthMask = NULL; diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c index 0822b6b8b14..7db354d193f 100644 --- a/src/mesa/drivers/dri/i810/i810context.c +++ b/src/mesa/drivers/dri/i810/i810context.c @@ -384,7 +384,7 @@ void i810XMesaSetBackClipRects( i810ContextPtr imesa ) static void i810XMesaWindowMoved( i810ContextPtr imesa ) { - switch (imesa->glCtx->Color._DrawDestMask) { + switch (imesa->glCtx->Color._DrawDestMask[0]) { case DD_FRONT_LEFT_BIT: i810XMesaSetFrontClipRects( imesa ); break; @@ -448,7 +448,7 @@ i810UpdatePageFlipping( i810ContextPtr imesa ) GLcontext *ctx = imesa->glCtx; int front = 0; - switch (ctx->Color._DrawDestMask) { + switch (ctx->Color._DrawDestMask[0]) { case DD_FRONT_LEFT_BIT: front = 1; break; diff --git a/src/mesa/drivers/dri/i810/i810ioctl.c b/src/mesa/drivers/dri/i810/i810ioctl.c index 1e49d1782e4..c62e5817899 100644 --- a/src/mesa/drivers/dri/i810/i810ioctl.c +++ b/src/mesa/drivers/dri/i810/i810ioctl.c @@ -225,7 +225,7 @@ void i810PageFlip( const __DRIdrawablePrivate *dPriv ) } /* i810SetDrawBuffer( imesa->glCtx, imesa->glCtx->Color.DriverDrawBuffer );*/ - i810DrawBuffer( imesa->glCtx, imesa->glCtx->Color.DrawBuffer ); + i810DrawBuffer( imesa->glCtx, imesa->glCtx->Color.DrawBuffer[0] ); imesa->upload_cliprects = GL_TRUE; imesa->lastSwap = tmp; return; diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c index 4a1c15f8afc..35fad6529c9 100644 --- a/src/mesa/drivers/dri/i810/i810state.c +++ b/src/mesa/drivers/dri/i810/i810state.c @@ -284,7 +284,7 @@ void i810DrawBuffer(GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: front = 1; break; diff --git a/src/mesa/drivers/dri/i830/i830_context.c b/src/mesa/drivers/dri/i830/i830_context.c index d5d8e0a9d43..b69f11a0c0d 100644 --- a/src/mesa/drivers/dri/i830/i830_context.c +++ b/src/mesa/drivers/dri/i830/i830_context.c @@ -468,7 +468,7 @@ void i830XMesaSetBackClipRects( i830ContextPtr imesa ) static void i830XMesaWindowMoved( i830ContextPtr imesa ) { - switch (imesa->glCtx->Color._DrawDestMask) { + switch (imesa->glCtx->Color._DrawDestMask[0]) { case DD_FRONT_LEFT_BIT: i830XMesaSetFrontClipRects( imesa ); break; diff --git a/src/mesa/drivers/dri/i830/i830_state.c b/src/mesa/drivers/dri/i830/i830_state.c index 3fe645aa8fd..12cec35c3da 100644 --- a/src/mesa/drivers/dri/i830/i830_state.c +++ b/src/mesa/drivers/dri/i830/i830_state.c @@ -803,7 +803,7 @@ static void i830DrawBuffer(GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: I830_FIREVERTICES(imesa); I830_STATECHANGE(imesa, I830_UPLOAD_BUFFERS); diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index e637d38a11c..c1559e9567e 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -491,7 +491,7 @@ void intelSetBackClipRects( intelContextPtr intel ) void intelWindowMoved( intelContextPtr intel ) { - switch (intel->ctx.Color._DrawDestMask) { + switch (intel->ctx.Color._DrawDestMask[0]) { case DD_FRONT_LEFT_BIT: intelSetFrontClipRects( intel ); break; @@ -683,5 +683,5 @@ void intelInitState( GLcontext *ctx ) ctx->Stencil.ZPassFunc[0]); - ctx->Driver.DrawBuffer( ctx, ctx->Color.DrawBuffer ); + ctx->Driver.DrawBuffer( ctx, ctx->Color.DrawBuffer[0] ); } diff --git a/src/mesa/drivers/dri/i915/intel_state.c b/src/mesa/drivers/dri/i915/intel_state.c index 46633c553e3..44ef775465a 100644 --- a/src/mesa/drivers/dri/i915/intel_state.c +++ b/src/mesa/drivers/dri/i915/intel_state.c @@ -43,7 +43,7 @@ static void intelDrawBuffer(GLcontext *ctx, GLenum mode ) intelScreenPrivate *screen = intel->intelScreen; int front = 0; - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: front = 1; FALLBACK( intel, INTEL_FALLBACK_DRAW_BUFFER, GL_FALSE ); diff --git a/src/mesa/drivers/dri/mach64/mach64_lock.c b/src/mesa/drivers/dri/mach64/mach64_lock.c index 0b4f61abc27..ea926944ed4 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 == DD_BACK_LEFT_BIT) + if (mmesa->glCtx->Color._DrawDestMask[0] == 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_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c index 99c8bad6c1d..91f588bb788 100644 --- a/src/mesa/drivers/dri/mach64/mach64_state.c +++ b/src/mesa/drivers/dri/mach64/mach64_state.c @@ -729,7 +729,7 @@ static void mach64DDDrawBuffer( GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: FALLBACK( mmesa, MACH64_FALLBACK_DRAW_BUFFER, GL_FALSE ); mach64SetCliprects( ctx, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c index fd00de43c21..6e63294f65e 100644 --- a/src/mesa/drivers/dri/mga/mgastate.c +++ b/src/mesa/drivers/dri/mga/mgastate.c @@ -822,7 +822,7 @@ static void mgaDDDrawBuffer(GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: mmesa->setup.dstorg = mmesa->mgaScreen->frontOffset; 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 876db765755..f4b43d56c10 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 == DD_BACK_LEFT_BIT); + use_back = (rmesa->glCtx->Color._DrawDestMask[0] == 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_state.c b/src/mesa/drivers/dri/r128/r128_state.c index cd3e4181b33..4e43629f49b 100644 --- a/src/mesa/drivers/dri/r128/r128_state.c +++ b/src/mesa/drivers/dri/r128/r128_state.c @@ -713,7 +713,7 @@ static void r128DDDrawBuffer( GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: FALLBACK( rmesa, R128_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; diff --git a/src/mesa/drivers/dri/r200/r200_lock.c b/src/mesa/drivers/dri/r200/r200_lock.c index 539a4be619b..ef4fed52714 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 == DD_BACK_LEFT_BIT); + use_back = (rmesa->glCtx->Color._DrawDestMask[0] == 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 == DD_BACK_LEFT_BIT) + if (rmesa->glCtx->Color._DrawDestMask[0] == DD_BACK_LEFT_BIT) r200SetCliprects( rmesa, GL_BACK_LEFT ); else r200SetCliprects( rmesa, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index c6c436743f5..dd547f9957a 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -1751,7 +1751,7 @@ static void r200DrawBuffer( GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: FALLBACK( rmesa, R200_FALLBACK_DRAW_BUFFER, GL_FALSE ); r200SetCliprects( rmesa, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c index 3bcd68d3e42..937a284e104 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 == DD_BACK_LEFT_BIT); + use_back = (rmesa->glCtx->Color._DrawDestMask[0] == 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 == DD_BACK_LEFT_BIT) + if (rmesa->glCtx->Color._DrawDestMask[0] == DD_BACK_LEFT_BIT) radeonSetCliprects( rmesa, GL_BACK_LEFT ); else radeonSetCliprects( rmesa, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 3bd2a88d420..bc94882a660 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -1612,7 +1612,7 @@ static void radeonDrawBuffer( GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: FALLBACK( rmesa, RADEON_FALLBACK_DRAW_BUFFER, GL_FALSE ); radeonSetCliprects( rmesa, GL_FRONT_LEFT ); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index f1fd5eacf0b..a6ef167a7d6 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -598,7 +598,7 @@ static void savageXMesaWindowMoved( savageContextPtr imesa ) if (0) fprintf(stderr, "savageXMesaWindowMoved\n\n"); - switch (imesa->glCtx->Color._DrawDestMask) { + switch (imesa->glCtx->Color._DrawDestMask[0]) { case DD_FRONT_LEFT_BIT: savageXMesaSetFrontClipRects( imesa ); break; diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c index e5c8b96eec3..e03c2e340cc 100644 --- a/src/mesa/drivers/dri/savage/savagestate.c +++ b/src/mesa/drivers/dri/savage/savagestate.c @@ -638,7 +638,7 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: imesa->IsDouble = GL_FALSE; @@ -1768,7 +1768,7 @@ void savageDDInitState( savageContextPtr imesa ) { imesa->regs.s4.zBufOffset.ni.zDepthSelect = 1; } - if (imesa->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT) { + if (imesa->glCtx->Color._DrawDestMask[0] == DD_BACK_LEFT_BIT) { if(imesa->IsFullScreen) { imesa->toggle = TARGET_BACK; diff --git a/src/mesa/drivers/dri/sis/sis_lock.c b/src/mesa/drivers/dri/sis/sis_lock.c index 5e6a0d468d8..f598e52d921 100644 --- a/src/mesa/drivers/dri/sis/sis_lock.c +++ b/src/mesa/drivers/dri/sis/sis_lock.c @@ -65,7 +65,7 @@ sisGetLock( sisContextPtr smesa, GLuint flags ) if ( smesa->lastStamp != dPriv->lastStamp ) { sisUpdateBufferSize( smesa ); sisUpdateClipping( smesa->glCtx ); - sisDDDrawBuffer( smesa->glCtx, smesa->glCtx->Color.DrawBuffer ); + sisDDDrawBuffer( smesa->glCtx, smesa->glCtx->Color.DrawBuffer[0] ); smesa->lastStamp = dPriv->lastStamp; } diff --git a/src/mesa/drivers/dri/sis/sis_state.c b/src/mesa/drivers/dri/sis/sis_state.c index 4b1d2b00178..422059b86b1 100644 --- a/src/mesa/drivers/dri/sis/sis_state.c +++ b/src/mesa/drivers/dri/sis/sis_state.c @@ -510,7 +510,7 @@ void sisDDDrawBuffer( GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: case DD_BACK_LEFT_BIT: FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE ); diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c index 04c750e5509..45a92e5e92b 100644 --- a/src/mesa/drivers/dri/sis/sis_tris.c +++ b/src/mesa/drivers/dri/sis/sis_tris.c @@ -805,7 +805,7 @@ static void sisRenderStart( GLcontext *ctx ) GLuint AGPParseSet = smesa->AGPParseSet; GLboolean tex_fallback = GL_FALSE; - if (ctx->Color._DrawDestMask == DD_FRONT_LEFT_BIT && + if (ctx->Color._DrawDestMask[0] == DD_FRONT_LEFT_BIT && smesa->driDrawable->numClipRects != 0) { multipass_cliprect(ctx, 0); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c index 803c8c5c1cc..aaee401d7ab 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c @@ -255,7 +255,7 @@ tdfx_bitmap_R5G6B5(GLcontext * ctx, GLint px, GLint py, * to the front or back buffer. This compile-time test seems to do * the job for now. */ - const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) + const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 2); GLint row; /* compute dest address of bottom-left pixel in bitmap */ @@ -407,7 +407,7 @@ tdfx_bitmap_R8G8B8A8(GLcontext * ctx, GLint px, GLint py, GLuint *dst; GLint row; - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { + if (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) { dstStride = fxMesa->screen_width; dst = (GLuint *) info.lfbPtr + (winY - py) * dstStride + (winX + @@ -508,7 +508,7 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y, fxMesa->ReadBuffer, GR_LFBWRITEMODE_ANY, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == + const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 2); const GLushort *src = (const GLushort *) info.lfbPtr + scrY * srcStride + scrX; @@ -567,7 +567,7 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, GR_LFBWRITEMODE_ANY, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { - const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) + const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 4); const GLuint *src = (const GLuint *) info.lfbPtr + scrY * srcStride + scrX; @@ -646,7 +646,7 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, } /* look for clipmasks, giveup if region obscured */ - if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { + if (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) { if (!inClipRects_Region(fxMesa, scrX, scrY, width, height)) { UNLOCK_HARDWARE(fxMesa); _swrast_DrawPixels( ctx, x, y, width, height, format, type, @@ -661,7 +661,7 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, GR_LFBWRITEMODE_8888, GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) { - const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) + const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) ? (fxMesa->screen_width * 4) : (info.strideInBytes); GLubyte *dst = (GLubyte *) info.lfbPtr + scrY * dstStride + scrX * 4; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_render.c b/src/mesa/drivers/dri/tdfx/tdfx_render.c index 1c552894699..3ce91b9257b 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_render.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_render.c @@ -278,7 +278,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear); FX_grColorMaskv_NoLock(ctx, true4); - if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) + if (ctx->Color._DrawDestMask[0] & DD_FRONT_LEFT_BIT) fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); if (!ctx->Depth.Test || !ctx->Depth.Mask) fxMesa->Glide.grDepthMask(FXFALSE); @@ -298,7 +298,7 @@ static void tdfxClear( GLcontext *ctx, fxMesa->Glide.grDepthMask(FXTRUE); } FX_grColorMaskv_NoLock(ctx, true4); - if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) + if (ctx->Color._DrawDestMask[0] & 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 0d2bc811e04..1bcec634131 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_span.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c @@ -49,7 +49,7 @@ #define LOCAL_VARS \ __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \ tdfxScreenPrivate *fxPriv = fxMesa->fxScreen; \ - GLuint pitch = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) \ + GLuint pitch = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) \ ? (fxMesa->screen_width * BYTESPERPIXEL) : \ (info.strideInBytes); \ GLuint height = fxMesa->height; \ diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c index 7f1ce3c004d..818a9bc23f4 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_state.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c @@ -1033,7 +1033,7 @@ static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode ) /* * _DrawDestMask is easier to cope with than <mode>. */ - switch ( ctx->Color._DrawDestMask ) { + switch ( ctx->Color._DrawDestMask[0] ) { case DD_FRONT_LEFT_BIT: fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; fxMesa->new_state |= TDFX_NEW_RENDER; diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index 4ebf393ac87..13648854f33 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -719,7 +719,7 @@ void viaXMesaWindowMoved(viaContextPtr vmesa) GLuint side = 0; __DRIdrawablePrivate *dPriv = vmesa->driDrawable; - switch (vmesa->glCtx->Color._DrawDestMask) { + switch (vmesa->glCtx->Color._DrawDestMask[0]) { case __GL_FRONT_BUFFER_MASK: viaXMesaSetFrontClipRects(vmesa); break; diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index eaa5a726e53..6021efefedf 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -463,7 +463,7 @@ void viaPageFlip(const __DRIdrawablePrivate *dPriv) if(vmesa->currentPage) { vmesa->currentPage = 0; - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { ctx->Driver.DrawBuffer(ctx, GL_BACK); } else { @@ -472,7 +472,7 @@ void viaPageFlip(const __DRIdrawablePrivate *dPriv) } else { vmesa->currentPage = 1; - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { ctx->Driver.DrawBuffer(ctx, GL_BACK); } else { @@ -1112,7 +1112,7 @@ void viaFillStencilDepthBuffer(viaContextPtr vmesa, GLuint pixel) } } - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { viaFlushPrimsLocked(vmesa); } } @@ -1180,7 +1180,7 @@ void viaFillStencilBuffer(viaContextPtr vmesa, GLuint pixel) } } - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { viaFlushPrimsLocked(vmesa); } } @@ -1265,7 +1265,7 @@ void viaFillDepthBuffer(viaContextPtr vmesa, GLuint pixel) } } - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { viaFlushPrimsLocked(vmesa); } } @@ -1556,9 +1556,9 @@ int flush_agp(viaContextPtr vmesa, drm_via_flush_agp_t* agpCmd) /*=* [DBG] make draw to front buffer *=*/ if(DRAW_FRONT) - vmesa->glCtx->Color._DrawDestMask = __GL_FRONT_BUFFER_MASK; + vmesa->glCtx->Color._DrawDestMask[0] = __GL_FRONT_BUFFER_MASK; - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { *vb++ = HC_HEADER2; *vb++ = (HC_ParaType_NotTex << 16); @@ -1807,9 +1807,9 @@ int flush_agp_saam(viaContextPtr vmesa, drm_via_flush_agp_t* agpCmd) /*=* [DBG] make draw to front buffer *=*/ if(DRAW_FRONT) - vmesa->glCtx->Color._DrawDestMask = __GL_FRONT_BUFFER_MASK; + vmesa->glCtx->Color._DrawDestMask[0] = __GL_FRONT_BUFFER_MASK; - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { *vb++ = HC_HEADER2; *vb++ = (HC_ParaType_NotTex << 16); @@ -2035,7 +2035,7 @@ int flush_sys(viaContextPtr vmesa, drm_via_flush_sys_t* buf) /*=* [DBG] make draw to front buffer *=*/ if(DRAW_FRONT) - vmesa->glCtx->Color._DrawDestMask = __GL_FRONT_BUFFER_MASK; + vmesa->glCtx->Color._DrawDestMask[0] = __GL_FRONT_BUFFER_MASK; /*=* John Sheng [2003.6.20] fix pci *=*/ @@ -2064,7 +2064,7 @@ int flush_sys(viaContextPtr vmesa, drm_via_flush_sys_t* buf) *vmesa->regTranSpace = 0x46800408; vmesa->VQEnable = 0; } - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { *vb++ = HC_HEADER2; *vb++ = (HC_ParaType_NotTex << 16); diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c index fcb97718758..4fdb1aa9663 100644 --- a/src/mesa/drivers/dri/unichrome/via_span.c +++ b/src/mesa/drivers/dri/unichrome/via_span.c @@ -163,7 +163,7 @@ GLushort p; \ char *buf, *read_buf; \ p = 0; \ - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { \ + if (vmesa->glCtx->Color._DrawDestMask[0][0] == __GL_BACK_BUFFER_MASK) { \ buf = (char *)(vmesa->drawMap); \ read_buf = (char *)(vmesa->readMap); \ } \ @@ -224,7 +224,7 @@ GLuint p; \ char *buf, *read_buf; \ p = 0; \ - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { \ + if (vmesa->glCtx->Color._DrawDestMask[0][0] == __GL_BACK_BUFFER_MASK) { \ buf = (char *)(vmesa->drawMap); \ read_buf = (char *)(vmesa->readMap); \ } \ diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c index f5b97de52c7..79ce4cbe88d 100644 --- a/src/mesa/drivers/dri/unichrome/via_state.c +++ b/src/mesa/drivers/dri/unichrome/via_state.c @@ -336,7 +336,7 @@ static void viaBitmap( GLcontext *ctx, GLint px, GLint py, /*=* John Sheng [2003.7.18] texenv *=*/ /*if (!vmesa->drawMap && !vmesa->readMap) {*/ if (1) { - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { viaDrawBuffer(ctx, GL_BACK); } else { @@ -497,7 +497,7 @@ void viaInitState(GLcontext *ctx) vmesa->regCmdB = HC_ACMD_HCmdB | HC_HVPMSK_X | HC_HVPMSK_Y | HC_HVPMSK_Z; vmesa->regEnable = HC_HenCW_MASK; - if (vmesa->glCtx->Color._DrawDestMask == __GL_BACK_BUFFER_MASK) { + if (vmesa->glCtx->Color._DrawDestMask[0] == __GL_BACK_BUFFER_MASK) { vmesa->drawMap = vmesa->back.map; vmesa->readMap = vmesa->back.map; } diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 3af3b7cd3df..74d0dc008ca 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1944,8 +1944,8 @@ fx_check_IsInHardware(GLcontext * ctx) return FX_FALLBACK_STENCIL; } - if (ctx->Color._DrawDestMask != DD_FRONT_LEFT_BIT && - ctx->Color._DrawDestMask != DD_BACK_LEFT_BIT) { + if (ctx->Color._DrawDestMask[0] != DD_FRONT_LEFT_BIT && + ctx->Color._DrawDestMask[0] != DD_BACK_LEFT_BIT) { return FX_FALLBACK_DRAW_BUFFER; } diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index eada4740956..4a8a92a0c8e 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -1667,6 +1667,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) _mesa_enable_1_3_extensions(mesaCtx); _mesa_enable_1_4_extensions(mesaCtx); _mesa_enable_1_5_extensions(mesaCtx); + _mesa_enable_2_0_extensions(mesaCtx); /* finish up xmesa context initializations */ c->swapbytes = CHECK_BYTE_ORDER(v) ? GL_FALSE : GL_TRUE; diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index ebd75cd3bc9..4a290c84db7 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -986,7 +986,7 @@ xmesa_CopyPixels( GLcontext *ctx, if (swrast->NewState) _swrast_validate_derived( ctx ); - if (ctx->Color.DrawBuffer == GL_FRONT && + if (ctx->Color.DrawBuffer[0] == GL_FRONT && ctx->Pixel.ReadBuffer == GL_FRONT && drawBuffer && /* buffer != 0 means it's a Window or Pixmap */ readBuffer && @@ -1104,7 +1104,7 @@ void xmesa_update_state( GLcontext *ctx, GLuint new_state ) break; } - if (ctx->Color._DrawDestMask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) { + if (ctx->Color._DrawDestMask[0] & (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 a5352d61474..ccb54a391cb 100644 --- a/src/mesa/drivers/x11/xm_line.c +++ b/src/mesa/drivers/x11/xm_line.c @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.3 * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -492,7 +491,7 @@ 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) + if ((ctx->Color._DrawDestMask[0] & (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; diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c index f018a6acacb..01585b05b4d 100644 --- a/src/mesa/drivers/x11/xm_tri.c +++ b/src/mesa/drivers/x11/xm_tri.c @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.3 * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1313,7 +1312,7 @@ 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) + if ((ctx->Color._DrawDestMask[0] & (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; |