fix clipping bug on context change (Martijn van Oosterhout)
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 3 Jul 2006 13:17:00 +0000 (13:17 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 3 Jul 2006 13:17:00 +0000 (13:17 +0000)
src/mesa/drivers/dri/r128/r128_state.c

index 3a1d71d21544283dded35753fdc379fa78a8d304..05ab3890d2cbd5eb5e3f02f184d16e92a627b215 100644 (file)
@@ -1132,6 +1132,15 @@ void r128EmitHwStateLocked( r128ContextPtr rmesa )
                        R128_UPLOAD_WINDOW |
                        R128_UPLOAD_CORE) ) {
       memcpy( &sarea->context_state, regs, sizeof(sarea->context_state) );
+      
+      if( rmesa->dirty & R128_UPLOAD_CONTEXT )
+      {
+         /* One possible side-effect of uploading a new context is the
+          * setting of the R128_GMC_AUX_CLIP_DIS bit, which causes all
+          * auxilliary cliprects to be disabled. So the next command must
+          * upload them again. */
+         rmesa->dirty |= R128_UPLOAD_CLIPRECTS;
+      }
    }
 
    if ( (rmesa->dirty & R128_UPLOAD_TEX0) && t0 ) {