diff options
author | Keith Whitwell <[email protected]> | 2009-07-24 18:17:05 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:18 +0100 |
commit | 80eb276630a194632d9eba1e2b107d678d0f0a4d (patch) | |
tree | 6663c2ad80067409280dda7cd9ab75097bdbcb01 /src/gallium/drivers/llvmpipe/lp_quad_stipple.c | |
parent | bdbb4beb21876010b14785569a920fa65a67d1ad (diff) |
llvmpipe: actually pass >1 quad from triangle routine
First attempt
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_quad_stipple.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_quad_stipple.c | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_quad_stipple.c b/src/gallium/drivers/llvmpipe/lp_quad_stipple.c index 429a2185406..353c1ddcfa5 100644 --- a/src/gallium/drivers/llvmpipe/lp_quad_stipple.c +++ b/src/gallium/drivers/llvmpipe/lp_quad_stipple.c @@ -20,37 +20,35 @@ stipple_quad(struct quad_stage *qs, struct quad_header *quads[], unsigned nr) static const uint bit30 = 1 << 30; unsigned pass = nr; - if (quads[0]->input.prim == QUAD_PRIM_TRI) { - struct llvmpipe_context *llvmpipe = qs->llvmpipe; - unsigned q; + struct llvmpipe_context *llvmpipe = qs->llvmpipe; + unsigned q; - pass = 0; + pass = 0; - for (q = 0; q < nr; q++) { - struct quad_header *quad = quads[q]; + for (q = 0; q < nr; q++) { + struct quad_header *quad = quads[q]; - const int col0 = quad->input.x0 % 32; - const int y0 = quad->input.y0; - const int y1 = y0 + 1; - const uint stipple0 = llvmpipe->poly_stipple.stipple[y0 % 32]; - const uint stipple1 = llvmpipe->poly_stipple.stipple[y1 % 32]; + const int col0 = quad->input.x0 % 32; + const int y0 = quad->input.y0; + const int y1 = y0 + 1; + const uint stipple0 = llvmpipe->poly_stipple.stipple[y0 % 32]; + const uint stipple1 = llvmpipe->poly_stipple.stipple[y1 % 32]; - /* turn off quad mask bits that fail the stipple test */ - if ((stipple0 & (bit31 >> col0)) == 0) - quad->inout.mask &= ~MASK_TOP_LEFT; + /* turn off quad mask bits that fail the stipple test */ + if ((stipple0 & (bit31 >> col0)) == 0) + quad->inout.mask &= ~MASK_TOP_LEFT; - if ((stipple0 & (bit30 >> col0)) == 0) - quad->inout.mask &= ~MASK_TOP_RIGHT; + if ((stipple0 & (bit30 >> col0)) == 0) + quad->inout.mask &= ~MASK_TOP_RIGHT; - if ((stipple1 & (bit31 >> col0)) == 0) - quad->inout.mask &= ~MASK_BOTTOM_LEFT; + if ((stipple1 & (bit31 >> col0)) == 0) + quad->inout.mask &= ~MASK_BOTTOM_LEFT; - if ((stipple1 & (bit30 >> col0)) == 0) - quad->inout.mask &= ~MASK_BOTTOM_RIGHT; + if ((stipple1 & (bit30 >> col0)) == 0) + quad->inout.mask &= ~MASK_BOTTOM_RIGHT; - if (quad->inout.mask) - quads[pass++] = quad; - } + if (quad->inout.mask) + quads[pass++] = quad; } qs->next->run(qs->next, quads, pass); |