Merge branch 'mesa_7_7_branch'
[mesa.git] / src / mesa / swrast / s_span.c
index 4ea9547cd9203c84521df1612cbcf5a30248c707..874a37b2241abe83a29977992a6bacfdb4199a7f 100644 (file)
@@ -1316,6 +1316,13 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
 
    ASSERT(span->end <= MAX_WIDTH);
 
+   /* Depth bounds test */
+   if (ctx->Depth.BoundsTest && fb->Visual.depthBits > 0) {
+      if (!_swrast_depth_bounds_test(ctx, span)) {
+         return;
+      }
+   }
+
 #ifdef DEBUG
    /* Make sure all fragments are within window bounds */
    if (span->arrayMask & SPAN_XY) {