diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-09-11 16:01:17 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-09-11 16:01:17 -0600 |
commit | 09fbb3837b6aa5dfc6c94f41ab5443820177c569 (patch) | |
tree | 760ff57ac6a5fc503c41e9eb783fb82cb5a428e6 /src/mesa/pipe/softpipe/sp_quad_occlusion.c | |
parent | 5620d66e362acff99dbc748feec1da1e0f997288 (diff) |
Implement query object interface.
This replaces the temporary occlusion counter functions we had before.
Added new ctx->Driver.WaitQuery() function which should block until the result is ready.
Sketch out some code for vertex transformation feedback counters.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_quad_occlusion.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_occlusion.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_occlusion.c b/src/mesa/pipe/softpipe/sp_quad_occlusion.c index 6b094a5bef..4f178f0557 100644 --- a/src/mesa/pipe/softpipe/sp_quad_occlusion.c +++ b/src/mesa/pipe/softpipe/sp_quad_occlusion.c @@ -44,11 +44,13 @@ static void occlusion_count_quad(struct quad_stage *qs, struct quad_header *quad) { struct softpipe_context *softpipe = qs->softpipe; + struct pipe_query_object *occ + = softpipe->queries[PIPE_QUERY_OCCLUSION_COUNTER]; - softpipe->occlusion_counter += (quad->mask ) & 1; - softpipe->occlusion_counter += (quad->mask >> 1) & 1; - softpipe->occlusion_counter += (quad->mask >> 2) & 1; - softpipe->occlusion_counter += (quad->mask >> 3) & 1; + occ->count += (quad->mask ) & 1; + occ->count += (quad->mask >> 1) & 1; + occ->count += (quad->mask >> 2) & 1; + occ->count += (quad->mask >> 3) & 1; if (quad->mask) qs->next->run(qs->next, quad); |