summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_depth.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_depth.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_depth.c')
-rw-r--r--src/mesa/swrast/s_depth.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 5a7fc4b4ed7..3a3f1904d00 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.11 2002/01/21 18:12:34 brianp Exp $ */
+/* $Id: s_depth.c,v 1.12 2002/01/27 18:32:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -572,10 +572,8 @@ _mesa_depth_test_span( GLcontext *ctx, struct sw_span *span)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- ASSERT(span->activeMask & SPAN_Z);
- ASSERT(span->filledMask == GL_TRUE);
- ASSERT(span->filledDepth == GL_TRUE);
- SW_SPAN_SET_FLAG(span->testedDepth);
+ ASSERT((span->interpMask & SPAN_Z) || (span->arrayMask & SPAN_Z));
+ ASSERT((span->filledDepth == GL_TRUE) || (span->arrayMask & SPAN_Z));
if (swrast->Driver.ReadDepthSpan) {
/* hardware-based depth buffer */
@@ -583,7 +581,7 @@ _mesa_depth_test_span( GLcontext *ctx, struct sw_span *span)
GLuint passed;
(*swrast->Driver.ReadDepthSpan)(ctx, span->end, span->x, span->y, zbuffer);
passed = depth_test_span32(ctx, span->end, span->x, span->y,
- zbuffer, span->depth, span->mask);
+ zbuffer, span->zArray, span->mask);
ASSERT(swrast->Driver.WriteDepthSpan);
(*swrast->Driver.WriteDepthSpan)(ctx, span->end, span->x, span->y, zbuffer, span->mask);
if (passed < span->end)
@@ -595,11 +593,11 @@ _mesa_depth_test_span( GLcontext *ctx, struct sw_span *span)
/* software depth buffer */
if (ctx->Visual.depthBits <= 16) {
GLushort *zptr = (GLushort *) Z_ADDRESS16(ctx, span->x, span->y);
- passed = depth_test_span16(ctx, span->end, span->x, span->y, zptr, span->depth, span->mask);
+ passed = depth_test_span16(ctx, span->end, span->x, span->y, zptr, span->zArray, span->mask);
}
else {
GLuint *zptr = (GLuint *) Z_ADDRESS32(ctx, span->x, span->y);
- passed = depth_test_span32(ctx, span->end, span->x, span->y, zptr, span->depth, span->mask);
+ passed = depth_test_span32(ctx, span->end, span->x, span->y, zptr, span->zArray, span->mask);
}
if (passed < span->end)
span->writeAll = GL_FALSE;