Add check for mask == NULL to the one routine missing it.
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 12 May 2005 09:07:12 +0000 (09:07 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 12 May 2005 09:07:12 +0000 (09:07 +0000)
src/mesa/drivers/dri/common/depthtmp.h

index 7427316..9308829 100644 (file)
@@ -153,8 +153,17 @@ static void TAG(WriteDepthPixels)( GLcontext *ctx,
 #else
         HW_CLIPLOOP()
            {
-              for ( i = 0 ; i < n ; i++ ) {
-                 if ( mask[i] ) {
+              if ( mask ) {
+                 for ( i = 0 ; i < n ; i++ ) {
+                    if ( mask[i] ) {
+                       const int fy = Y_FLIP( y[i] );
+                       if ( CLIPPIXEL( x[i], fy ) )
+                          WRITE_DEPTH( x[i], fy, depth[i] );
+                    }
+                 }
+              }
+              else {
+                 for ( i = 0 ; i < n ; i++ ) {
                     const int fy = Y_FLIP( y[i] );
                     if ( CLIPPIXEL( x[i], fy ) )
                        WRITE_DEPTH( x[i], fy, depth[i] );