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 74273165e458909a7361743c2b02eb6a6501af44..9308829323261dd5f7ba47cfaecfe14e86eaaddb 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] );