From 714be699be31352af0faef0d99d11b8c4364ef00 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 12 May 2005 09:07:12 +0000 Subject: Add check for mask == NULL to the one routine missing it. --- src/mesa/drivers/dri/common/depthtmp.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/common/depthtmp.h') diff --git a/src/mesa/drivers/dri/common/depthtmp.h b/src/mesa/drivers/dri/common/depthtmp.h index 74273165e4..9308829323 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] ); -- cgit v1.2.3