diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-07-24 16:49:35 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-07-24 16:49:35 +0100 |
commit | ab9fb5167023a26566b53e98f206dd73a18000f3 (patch) | |
tree | 8c0942f9a0fd31173e5dd18be0a5ef88a4b83ff3 /src/gallium/drivers/softpipe/sp_quad_colormask.c | |
parent | 6153a1c28f118be1a74ffee0e19c16fb83b5cab7 (diff) |
softpipe: 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/softpipe/sp_quad_colormask.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad_colormask.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_colormask.c b/src/gallium/drivers/softpipe/sp_quad_colormask.c index 89efbe3b02..ac74287473 100644 --- a/src/gallium/drivers/softpipe/sp_quad_colormask.c +++ b/src/gallium/drivers/softpipe/sp_quad_colormask.c @@ -84,12 +84,23 @@ colormask_quad(struct quad_stage *qs, struct quad_header *quad) if (!(softpipe->blend->colormask & PIPE_MASK_A)) COPY_4V(quadColor[3], dest[3]); } +} + +static void +colormask_quads(struct quad_stage *qs, struct quad_header *quads[], + unsigned nr) +{ + unsigned i; + + for (i = 0; i < nr; i++) + colormask_quad(qs, quads[i]); /* pass quad to next stage */ - qs->next->run(qs->next, quad); + qs->next->run(qs->next, quads, nr); } + static void colormask_begin(struct quad_stage *qs) { qs->next->begin(qs->next); @@ -108,7 +119,7 @@ struct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe ) stage->softpipe = softpipe; stage->begin = colormask_begin; - stage->run = colormask_quad; + stage->run = colormask_quads; stage->destroy = colormask_destroy; return stage; |