summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/sis
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/sis')
-rw-r--r--src/mesa/drivers/dri/sis/sis6326_state.c18
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.c15
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.c2
3 files changed, 19 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/sis/sis6326_state.c b/src/mesa/drivers/dri/sis/sis6326_state.c
index 08402fb3e2..e47e663c35 100644
--- a/src/mesa/drivers/dri/sis/sis6326_state.c
+++ b/src/mesa/drivers/dri/sis/sis6326_state.c
@@ -497,25 +497,27 @@ void sis6326DDDrawBuffer( GLcontext *ctx, GLenum mode )
__GLSiSHardware *current = &smesa->current;
if(getenv("SIS_DRAW_FRONT"))
- ctx->DrawBuffer->_ColorDrawBufferMask[0] = GL_FRONT_LEFT;
+ ctx->DrawBuffer->_ColorDrawBufferIndexes[0] = BUFFER_FRONT_LEFT;
+
+ if (ctx->DrawBuffer->_NumColorDrawBuffers > 1) {
+ FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_TRUE );
+ return;
+ }
- /*
- * _DrawDestMask is easier to cope with than <mode>.
- */
current->hwDstSet &= ~MASK_DstBufferPitch;
- switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0] ) {
- case BUFFER_BIT_FRONT_LEFT:
+
+ switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0] ) {
+ case BUFFER_FRONT_LEFT:
current->hwOffsetDest = smesa->front.offset;
current->hwDstSet |= smesa->front.pitch;
FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE );
break;
- case BUFFER_BIT_BACK_LEFT:
+ case BUFFER_BACK_LEFT:
current->hwOffsetDest = smesa->back.offset;
current->hwDstSet |= smesa->back.pitch;
FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE );
break;
default:
- /* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */
FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_TRUE );
return;
}
diff --git a/src/mesa/drivers/dri/sis/sis_state.c b/src/mesa/drivers/dri/sis/sis_state.c
index 33a2f089b8..b7454d4a07 100644
--- a/src/mesa/drivers/dri/sis/sis_state.c
+++ b/src/mesa/drivers/dri/sis/sis_state.c
@@ -547,23 +547,24 @@ void sisDDDrawBuffer( GLcontext *ctx, GLenum mode )
__GLSiSHardware *prev = &smesa->prev;
__GLSiSHardware *current = &smesa->current;
- /*
- * _DrawDestMask is easier to cope with than <mode>.
- */
+ if (ctx->DrawBuffer->_NumColorDrawBuffers != 1) {
+ FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_TRUE );
+ return;
+ }
+
current->hwDstSet &= ~MASK_DstBufferPitch;
- switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0] ) {
- case BUFFER_BIT_FRONT_LEFT:
+ switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0] ) {
+ case BUFFER_FRONT_LEFT:
FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE );
current->hwOffsetDest = smesa->front.offset >> 1;
current->hwDstSet |= smesa->front.pitch >> 2;
break;
- case BUFFER_BIT_BACK_LEFT:
+ case BUFFER_BACK_LEFT:
FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE );
current->hwOffsetDest = smesa->back.offset >> 1;
current->hwDstSet |= smesa->back.pitch >> 2;
break;
default:
- /* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */
FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_TRUE );
return;
}
diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c
index a0e39dcd3c..adbbb8ae13 100644
--- a/src/mesa/drivers/dri/sis/sis_tris.c
+++ b/src/mesa/drivers/dri/sis/sis_tris.c
@@ -848,7 +848,7 @@ static void sisRenderStart( GLcontext *ctx )
RENDERINPUTS_COPY( index_bitset, tnl->render_inputs_bitset );
- if (ctx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT &&
+ if (ctx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT &&
smesa->driDrawable->numClipRects != 0)
{
multipass_cliprect(ctx, 0);