summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_depth.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-04-12 15:39:58 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-04-12 15:39:58 +0000
commitb7f5e92f1749ce4601a758f66ddc64959f11742b (patch)
treeb9d7056d88824cb49eab181c3ca6290039e1886f /src/mesa/swrast/s_depth.c
parent9add9a21d8c51ee4238169265541fa9a40f0a8b0 (diff)
Klaus Niederkrueger's latest changes: use INIT_SPAN() to init span primitive
type, width, interp mask and array mask.
Diffstat (limited to 'src/mesa/swrast/s_depth.c')
-rw-r--r--src/mesa/swrast/s_depth.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 81647f9fc9f..87841dde68b 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -1,4 +1,4 @@
-/* $Id: s_depth.c,v 1.19 2002/03/19 16:47:05 brianp Exp $ */
+/* $Id: s_depth.c,v 1.20 2002/04/12 15:39:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -567,8 +567,18 @@ depth_test_span( GLcontext *ctx, struct sw_span *span)
GLuint *zptr = (GLuint *) Z_ADDRESS32(ctx, x, y);
passed = depth_test_span32(ctx, n, zptr, span->zArray, span->mask);
}
- if (passed < span->end)
- span->writeAll = GL_FALSE;
+#if 0
+ /* this causes a glDrawPixels(GL_DEPTH_COMPONENT) conformance failure */
+ if (passed < span->end) {
+ span->writeAll = GL_FALSE;
+ if (passed == 0) {
+ span->end = 0;
+ return 0;
+ }
+ while (span->end > 0 && span->mask[span->end - 1] == 0)
+ span->end --;
+ }
+#endif
return passed;
}
}