fix unitialized values in radeonClear
authorRoland Scheidegger <sroland@tungstengraphics.com>
Thu, 1 Feb 2007 00:09:26 +0000 (01:09 +0100)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Thu, 1 Feb 2007 00:09:26 +0000 (01:09 +0100)
src/mesa/drivers/dri/radeon/radeon_ioctl.c

index 737490f..4c64bc2 100644 (file)
@@ -1087,10 +1087,6 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask )
       }
    }
 
-   /* Flip top to bottom */
-   cx += dPriv->x;
-   cy  = dPriv->y + dPriv->h - cy - ch;
-
    LOCK_HARDWARE( rmesa );
 
    /* compute region after locking: */
@@ -1099,6 +1095,10 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask )
    cw = ctx->DrawBuffer->_Xmax - cx;
    ch = ctx->DrawBuffer->_Ymax - cy;
 
+   /* Flip top to bottom */
+   cx += dPriv->x;
+   cy  = dPriv->y + dPriv->h - cy - ch;
+
    /* Throttle the number of clear ioctls we do.
     */
    while ( 1 ) {