Fixup previous commit.
authorMichel Dänzer <daenzer@vmware.com>
Mon, 16 Mar 2009 11:51:50 +0000 (12:51 +0100)
committerMichel Dänzer <daenzer@vmware.com>
Mon, 16 Mar 2009 11:51:50 +0000 (12:51 +0100)
radeonScheduleSwap() already takes the lock in the SwapBuffers case, only
the CopySubBuffer case was missing it.

src/mesa/drivers/dri/radeon/radeon_common.c

index 5ee8627bba795c1c6bfa08120f5367c10744f4e8..1a5d0467d4c01aaf5b8d44c0bef74069a23ee8b9 100644 (file)
@@ -420,7 +420,6 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
                fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, (void *) rmesa->glCtx );
        }
 
-       LOCK_HARDWARE( rmesa );
        nbox = dPriv->numClipRects; /* must be in locked region */
 
        for ( i = 0 ; i < nbox ; ) {
@@ -510,8 +509,6 @@ static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv )
 
        psp = dPriv->driScreenPriv;
 
-       LOCK_HARDWARE( radeon );
-
        if ( RADEON_DEBUG & DEBUG_IOCTL ) {
                fprintf(stderr, "%s: pfCurrentPage: %d %d\n", __FUNCTION__,
                        radeon->sarea->pfCurrentPage, radeon->sarea->pfState);
@@ -605,6 +602,8 @@ void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv,
                        rect.x2 = rect.x1 + w;
                        rect.y2 = rect.y1 + h;
                        _mesa_notifySwapBuffers(ctx);   /* flush pending rendering comands */
+                       LOCK_HARDWARE( (radeonContextPtr)
+                                      dPriv->driContextPriv->driverPrivate );
                        radeonCopyBuffer(dPriv, &rect);
                }
        } else {