From 328a039413fd2b8649511f1ca130df2a59f2c71c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 24 Sep 2004 14:30:13 +0000 Subject: patches for clearing hw depth buffers from software fallback (Nicolai Haehnle) --- src/mesa/drivers/dri/common/spantmp.h | 62 ++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 9 deletions(-) (limited to 'src/mesa/drivers/dri/common/spantmp.h') diff --git a/src/mesa/drivers/dri/common/spantmp.h b/src/mesa/drivers/dri/common/spantmp.h index 888be0465e..39d0221bbe 100644 --- a/src/mesa/drivers/dri/common/spantmp.h +++ b/src/mesa/drivers/dri/common/spantmp.h @@ -123,15 +123,29 @@ static void TAG(WriteRGBAPixels)( const GLcontext *ctx, HW_WRITE_CLIPLOOP() { - for (i=0;i0;i++,x1++,n1--) - if (mask[i]) + if (mask) + { + for (;n1>0;i++,x1++,n1--) + if (mask[i]) + WRITE_PIXEL( x1, y, p ); + } + else + { + for (;n1>0;i++,x1++,n1--) WRITE_PIXEL( x1, y, p ); + } } HW_ENDCLIPLOOP(); } @@ -186,12 +208,23 @@ static void TAG(WriteMonoRGBAPixels)( const GLcontext *ctx, HW_WRITE_CLIPLOOP() { - for (i=0;i