summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-06-24 16:35:18 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-06-24 16:35:18 +0000
commit939dd17653245621bf7488803f09418244b7b0b7 (patch)
tree50eaa1558f277fdb8ccfb748eb1ddd73b56c3d1a /src/mesa/swrast/s_span.c
parentde67b3ea18c68f69e0303f1ba88dbb26066049de (diff)
fix HP occlusion testing when using generic span path
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 41db42e2b8..0627dea9dd 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -939,10 +939,13 @@ _swrast_write_index_span( GLcontext *ctx, struct sw_span *span)
}
/* if we get here, something passed the depth test */
- ctx->OcclusionResult = GL_TRUE;
+ if (ctx->Depth.OcclusionTest) {
+ ctx->OcclusionResult = GL_TRUE;
+ }
#if FEATURE_ARB_occlusion_query
if (ctx->Occlusion.Active) {
+ /* update count of 'passed' fragments */
GLuint i;
for (i = 0; i < span->end; i++)
ctx->Occlusion.PassedCounter += span->array->mask[i];
@@ -1155,10 +1158,13 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span)
}
/* if we get here, something passed the depth test */
- ctx->OcclusionResult = GL_TRUE;
+ if (ctx->Depth.OcclusionTest) {
+ ctx->OcclusionResult = GL_TRUE;
+ }
#if FEATURE_ARB_occlusion_query
if (ctx->Occlusion.Active) {
+ /* update count of 'passed' fragments */
GLuint i;
for (i = 0; i < span->end; i++)
ctx->Occlusion.PassedCounter += span->array->mask[i];
@@ -1423,10 +1429,13 @@ _swrast_write_texture_span( GLcontext *ctx, struct sw_span *span)
}
/* if we get here, some fragments passed the depth test */
- ctx->OcclusionResult = GL_TRUE;
+ if (ctx->Depth.OcclusionTest) {
+ ctx->OcclusionResult = GL_TRUE;
+ }
#if FEATURE_ARB_occlusion_query
if (ctx->Occlusion.Active) {
+ /* update count of 'passed' fragments */
GLuint i;
for (i = 0; i < span->end; i++)
ctx->Occlusion.PassedCounter += span->array->mask[i];