summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/sis/sis_state.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-09-03 16:43:02 +0000
committerBrian Paul <[email protected]>2005-09-03 16:43:02 +0000
commit687918b794d12a0ff5d395b8cf87880dbe8012bf (patch)
tree280d1b882dc3bfd0e105d14a1f9d90c7cef935dd /src/mesa/drivers/dri/sis/sis_state.c
parente6925b51e1e71dc45079636ce336a09806356999 (diff)
SetBuffer, renderbuffer changes
Diffstat (limited to 'src/mesa/drivers/dri/sis/sis_state.c')
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_state.c b/src/mesa/drivers/dri/sis/sis_state.c
index db58e9090bc..50c45b63ed5 100644
--- a/src/mesa/drivers/dri/sis/sis_state.c
+++ b/src/mesa/drivers/dri/sis/sis_state.c
@@ -522,17 +522,21 @@ sisDDLogicOpCode( GLcontext *ctx, GLenum opcode )
void sisDDDrawBuffer( GLcontext *ctx, GLenum mode )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
-
__GLSiSHardware *prev = &smesa->prev;
__GLSiSHardware *current = &smesa->current;
+ int pitch;
/*
* _DrawDestMask is easier to cope with than <mode>.
*/
switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0] ) {
case BUFFER_BIT_FRONT_LEFT:
+ FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE );
+ pitch = smesa->frontPitch;
+ break;
case BUFFER_BIT_BACK_LEFT:
FALLBACK( smesa, SIS_FALLBACK_DRAW_BUFFER, GL_FALSE );
+ pitch = smesa->backPitch;
break;
default:
/* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */
@@ -540,14 +544,9 @@ void sisDDDrawBuffer( GLcontext *ctx, GLenum mode )
return;
}
- /* We want to update the s/w rast state too so that sisDDSetBuffer()
- * gets called.
- */
- _swrast_DrawBuffer(ctx, mode);
-
current->hwOffsetDest = (smesa->drawOffset) >> 1;
current->hwDstSet &= ~MASK_DstBufferPitch;
- current->hwDstSet |= smesa->drawPitch >> 2;
+ current->hwDstSet |= pitch >> 2;
if (current->hwDstSet != prev->hwDstSet) {
prev->hwDstSet = current->hwDstSet;