aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/savage')
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c2
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 013e88216fa..f23409fcbc9 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -730,7 +730,7 @@ void savageXMesaSetClipRects(savageContextPtr imesa)
__DRIdrawablePrivate *dPriv = imesa->driDrawable;
if ((dPriv->numBackClipRects == 0)
- || (imesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT)) {
+ || (imesa->glCtx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT)) {
imesa->numClipRects = dPriv->numClipRects;
imesa->pClipRects = dPriv->pClipRects;
imesa->drawX = dPriv->x;
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index 741a9dda4f7..7c36b133a91 100644
--- a/src/mesa/drivers/dri/savage/savagestate.c
+++ b/src/mesa/drivers/dri/savage/savagestate.c
@@ -640,15 +640,17 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode )
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
u_int32_t destCtrl = imesa->regs.s4.destCtrl.ui;
- /*
- * _DrawDestMask is easier to cope with than <mode>.
- */
- switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0] ) {
- case BUFFER_BIT_FRONT_LEFT:
+ if (ctx->DrawBuffer->_NumColorDrawBuffers != 1) {
+ FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_TRUE );
+ return;
+ }
+
+ switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0] ) {
+ case BUFFER_FRONT_LEFT:
imesa->IsDouble = GL_FALSE;
imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->frontOffset>>11;
break;
- case BUFFER_BIT_BACK_LEFT:
+ case BUFFER_BACK_LEFT:
imesa->IsDouble = GL_TRUE;
imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->backOffset>>11;
break;