summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-12 16:48:32 +0100
committerMichal Krol <michal@vmware.com>2009-12-12 16:48:32 +0100
commita3eb0f718e19653a2ad8e49396c904183be456f3 (patch)
tree0092574c469ea586a6cab8b8ebb7ac62b8221a2a /src/mesa/swrast/s_span.c
parent491f384c3958067e6c4c994041f5d8d413b806bc (diff)
parent784cca9fa527de771754d76545970f78094b9adf (diff)
Merge branch 'master' into glsl-pp-rework-2
Conflicts: progs/perf/drawoverhead.c progs/perf/teximage.c progs/perf/vbo.c progs/perf/vertexrate.c src/mesa/shader/slang/library/slang_common_builtin_gc.h
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index a45eac438e..d36c8132f6 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -880,14 +880,14 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span)
stipple_polygon_span(ctx, span);
}
- if (ctx->Transform.DepthClamp)
- _swrast_depth_clamp_span(ctx, span);
-
/* Stencil and Z testing */
if (ctx->Stencil._Enabled || ctx->Depth.Test) {
if (!(span->arrayMask & SPAN_Z))
_swrast_span_interpolate_z(ctx, span);
+ if (ctx->Transform.DepthClamp)
+ _swrast_depth_clamp_span(ctx, span);
+
if (ctx->Stencil._Enabled) {
if (!_swrast_stencil_and_ztest_span(ctx, span)) {
span->arrayMask = origArrayMask;
@@ -904,7 +904,6 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span)
}
}
-#if FEATURE_ARB_occlusion_query
if (ctx->Query.CurrentOcclusionObject) {
/* update count of 'passed' fragments */
struct gl_query_object *q = ctx->Query.CurrentOcclusionObject;
@@ -912,7 +911,6 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span)
for (i = 0; i < span->end; i++)
q->Result += span->array->mask[i];
}
-#endif
/* we have to wait until after occlusion to do this test */
if (ctx->Color.IndexMask == 0) {
@@ -1358,6 +1356,10 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
if (ctx->Stencil._Enabled || ctx->Depth.Test) {
if (!(span->arrayMask & SPAN_Z))
_swrast_span_interpolate_z(ctx, span);
+
+ if (ctx->Transform.DepthClamp)
+ _swrast_depth_clamp_span(ctx, span);
+
if (ctx->Stencil._Enabled) {
/* Combined Z/stencil tests */
if (!_swrast_stencil_and_ztest_span(ctx, span)) {
@@ -1376,7 +1378,6 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
}
}
-#if FEATURE_ARB_occlusion_query
if (ctx->Query.CurrentOcclusionObject) {
/* update count of 'passed' fragments */
struct gl_query_object *q = ctx->Query.CurrentOcclusionObject;
@@ -1384,7 +1385,6 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
for (i = 0; i < span->end; i++)
q->Result += span->array->mask[i];
}
-#endif
/* We had to wait until now to check for glColorMask(0,0,0,0) because of
* the occlusion test.