summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_span.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 1a51d4f045..07248c71af 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -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) {