From: Keith Whitwell Date: Thu, 12 May 2005 09:07:12 +0000 (+0000) Subject: Add check for mask == NULL to the one routine missing it. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=714be699be31352af0faef0d99d11b8c4364ef00;p=mesa.git Add check for mask == NULL to the one routine missing it. --- diff --git a/src/mesa/drivers/dri/common/depthtmp.h b/src/mesa/drivers/dri/common/depthtmp.h index 74273165e45..93088293232 100644 --- a/src/mesa/drivers/dri/common/depthtmp.h +++ b/src/mesa/drivers/dri/common/depthtmp.h @@ -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] );