summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_stencil.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-01-27 18:32:03 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-01-27 18:32:03 +0000
commit2a182a98973edc9ecf2936b1288485bb2b3fa722 (patch)
tree4c832bef597d1cbbccb7e7ab80f508aac2bbaba9 /src/mesa/swrast/s_stencil.c
parent6a731f343e847226537080122e2fb327e2486564 (diff)
LOTS of changes, building upon Klaus's work.
struct sw_span is used throughout span/fragment processing. This is leading to less code and more chances for optimization.
Diffstat (limited to 'src/mesa/swrast/s_stencil.c')
-rw-r--r--src/mesa/swrast/s_stencil.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 6e69fc8d70..3effec2af3 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -1,4 +1,4 @@
-/* $Id: s_stencil.c,v 1.15 2002/01/21 18:12:34 brianp Exp $ */
+/* $Id: s_stencil.c,v 1.16 2002/01/27 18:32:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -559,10 +559,11 @@ _mesa_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span)
ASSERT(ctx->Stencil.Enabled);
ASSERT(span->end <= MAX_WIDTH);
- ASSERT(span->filledMask == GL_TRUE);
- ASSERT(span->filledDepth == GL_TRUE);
- SW_SPAN_SET_FLAG(span->testedDepth);
-
+#ifdef DEBUG
+ if (ctx->Depth.Test) {
+ ASSERT((span->filledDepth == GL_TRUE) || (span->arrayMask & SPAN_Z));
+ }
+#endif
/* Get initial stencil values */
if (swrast->Driver.WriteStencilSpan) {
@@ -578,7 +579,7 @@ _mesa_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span)
/* do all the stencil/depth testing/updating */
result = stencil_and_ztest_span( ctx, span->end, span->x, span->y,
- span->depth, stencil, span->mask );
+ span->zArray, stencil, span->mask );
if (swrast->Driver.WriteStencilSpan) {
/* Write updated stencil values into hardware stencil buffer */