diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-12-15 09:48:11 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-12-15 09:48:11 +1100 |
commit | b5b9ac62e6a9667de4bb2078d5cd3199fe25f619 (patch) | |
tree | 5c3f389d10132cd2c9733c5c0f3d81a657298f53 /src/mesa/pipe/softpipe/sp_quad_stipple.c | |
parent | 7f89c776e19b400c0adf647fc9dfb392efe88dbd (diff) | |
parent | 017f862de1f857bca29f09794539aaf411014f13 (diff) |
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_quad_stipple.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_stipple.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_stipple.c b/src/mesa/pipe/softpipe/sp_quad_stipple.c index 04d95989c4..0c42963dfe 100644 --- a/src/mesa/pipe/softpipe/sp_quad_stipple.c +++ b/src/mesa/pipe/softpipe/sp_quad_stipple.c @@ -22,10 +22,18 @@ stipple_quad(struct quad_stage *qs, struct quad_header *quad) if (quad->prim == PRIM_TRI) { struct softpipe_context *softpipe = qs->softpipe; /* need to invert Y to index into OpenGL's stipple pattern */ - const int y0 = softpipe->framebuffer.cbufs[0]->height - 1 - quad->y0; - const int y1 = y0 - 1; - const unsigned stipple0 = softpipe->poly_stipple.stipple[y0 % 32]; - const unsigned stipple1 = softpipe->poly_stipple.stipple[y1 % 32]; + int y0, y1; + uint stipple0, stipple1; + if (softpipe->rasterizer->origin_lower_left) { + y0 = softpipe->framebuffer.cbufs[0]->height - 1 - quad->y0; + y1 = y0 - 1; + } + else { + y0 = quad->y0; + y1 = y0 + 1; + } + stipple0 = softpipe->poly_stipple.stipple[y0 % 32]; + stipple1 = softpipe->poly_stipple.stipple[y1 % 32]; #if 1 const int col0 = quad->x0 % 32; |