diff options
author | Brian Paul <[email protected]> | 2005-08-27 13:56:08 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-08-27 13:56:08 +0000 |
commit | 23ffc3a85d6172f8a98d17d7f23610bab808d84e (patch) | |
tree | 07211e0ccdc4f3418d8e434b39c43d80894e1077 /src/mesa/swrast/s_span.c | |
parent | ca1ac986a1d6d3f292e3d20540de884ad08d9816 (diff) |
Rearrange the code related to GL_ARB_occlusion_object to generalize query
objects for future types of queries.
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index d2cafeb7ac0..f99fa4cbaf7 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -850,11 +850,12 @@ _swrast_write_index_span( GLcontext *ctx, struct sw_span *span) } #if FEATURE_ARB_occlusion_query - if (ctx->Occlusion.Active) { + if (ctx->Query.CurrentOcclusionObject) { /* update count of 'passed' fragments */ + struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; GLuint i; for (i = 0; i < span->end; i++) - ctx->Occlusion.PassedCounter += span->array->mask[i]; + q->Result += span->array->mask[i]; } #endif @@ -1215,11 +1216,12 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span) } #if FEATURE_ARB_occlusion_query - if (ctx->Occlusion.Active) { + if (ctx->Query.CurrentOcclusionObject) { /* update count of 'passed' fragments */ + struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; GLuint i; for (i = 0; i < span->end; i++) - ctx->Occlusion.PassedCounter += span->array->mask[i]; + q->Result += span->array->mask[i]; } #endif |