diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-07-24 16:49:35 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-08-29 09:21:18 +0100 |
commit | bdbb4beb21876010b14785569a920fa65a67d1ad (patch) | |
tree | 40b8f2d0f6d4020c4229ab2e582f9b7e2a03bb5c /src/gallium/drivers/llvmpipe/lp_quad_occlusion.c | |
parent | 4486012245c5f526059d3872ac3561f53705d1cf (diff) |
llvmpipe: expand quad pipeline to process >1 quad at a time
This is part one -- we still only pass a single quad down, but
the code can now cope with more. The quads must all be from the same
tile.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_quad_occlusion.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_quad_occlusion.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_quad_occlusion.c b/src/gallium/drivers/llvmpipe/lp_quad_occlusion.c index 6441ca30f2..c4d5b86d42 100644 --- a/src/gallium/drivers/llvmpipe/lp_quad_occlusion.c +++ b/src/gallium/drivers/llvmpipe/lp_quad_occlusion.c @@ -50,13 +50,15 @@ static unsigned count_bits( unsigned val ) } static void -occlusion_count_quad(struct quad_stage *qs, struct quad_header *quad) +occlusion_count_quads(struct quad_stage *qs, struct quad_header *quads[], unsigned nr) { struct llvmpipe_context *llvmpipe = qs->llvmpipe; + unsigned i; - llvmpipe->occlusion_count += count_bits(quad->inout.mask); + for (i = 0; i < nr; i++) + llvmpipe->occlusion_count += count_bits(quads[i]->inout.mask); - qs->next->run(qs->next, quad); + qs->next->run(qs->next, quads, nr); } @@ -78,7 +80,7 @@ struct quad_stage *lp_quad_occlusion_stage( struct llvmpipe_context *llvmpipe ) stage->llvmpipe = llvmpipe; stage->begin = occlusion_begin; - stage->run = occlusion_count_quad; + stage->run = occlusion_count_quads; stage->destroy = occlusion_destroy; return stage; |