summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/depthtmp.h13
1 files changed, 11 insertions, 2 deletions
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] );