r200: Adapt cliprect fixes from r300.
authorAlan Swanson <swanson@ukfsn.org>
Mon, 12 Mar 2007 08:59:45 +0000 (09:59 +0100)
committerMichel Dänzer <michel@tungstengraphics.com>
Mon, 12 Mar 2007 08:59:45 +0000 (09:59 +0100)
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_lock.c
src/mesa/drivers/dri/r200/r200_state.c

index fc6eb93daa89320560d77be2578da35e9f076491..75efd9a83823dca31addc5bdf9d1fe003b5a4427 100644 (file)
@@ -673,11 +673,13 @@ r200MakeCurrent( __DRIcontextPrivate *driContextPriv,
                                &newCtx->vbl_seq );
       }
 
+      newCtx->dri.readable = driReadPriv;
+
       if ( newCtx->dri.drawable != driDrawPriv ||
-           newCtx->dri.readable != driReadPriv ) {
+           newCtx->lastStamp != driDrawPriv->lastStamp ) {
         newCtx->dri.drawable = driDrawPriv;
-        newCtx->dri.readable = driReadPriv;
 
+        r200SetCliprects(newCtx, GL_BACK_LEFT);
         r200UpdateWindow( newCtx->glCtx );
         r200UpdateViewportOffset( newCtx->glCtx );
       }
index bcc0c9163967639e1817204feab9a39267b15f44..745e59646746ba6e41abdff98e6bdbb14145ba18 100644 (file)
@@ -98,7 +98,6 @@ void r200GetLock( r200ContextPtr rmesa, GLuint flags )
          r200SetCliprects( rmesa, GL_FRONT_LEFT );
       r200UpdateViewportOffset( rmesa->glCtx );
       driUpdateFramebufferSize(rmesa->glCtx, drawable);
-      rmesa->lastStamp = drawable->lastStamp;
    }
 
    R200_STATECHANGE( rmesa, ctx );
index bdb487f2b93d5dd89005da9340fe78d3e1e5bbb2..911a340f60b61a2da7877244386a06837961851e 100644 (file)
@@ -1889,6 +1889,8 @@ void r200SetCliprects( r200ContextPtr rmesa, GLenum mode )
 
    if (rmesa->state.scissor.enabled)
       r200RecalcScissorRects( rmesa );
+
+   rmesa->lastStamp = drawable->lastStamp;
 }