diff options
author | Keith Whitwell <keithw@vmware.com> | 2010-10-15 13:04:19 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-10-15 13:27:47 +0100 |
commit | 8965f042b327ad8697963e757f4607f4bb13a045 (patch) | |
tree | d8d0dbb5295fb3370b9be2d86f3a90a25994d6bf /src/gallium/drivers/llvmpipe/lp_setup_tri.c | |
parent | 9bf8a55c4b29d55320fc2e7875ecf0e9ca164ee8 (diff) |
llvmpipe: don't store plane.ei value in binned data
Further reduce the size of a binned triangle.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_tri.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 937821b4c3..6ceda80a71 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -374,10 +374,6 @@ do_triangle_ccw(struct lp_setup_context *setup, plane[i].eo = 0; if (plane[i].dcdx < 0) plane[i].eo -= plane[i].dcdx; if (plane[i].dcdy > 0) plane[i].eo += plane[i].dcdy; - - /* Calculate trivial accept offsets from the above. - */ - plane[i].ei = plane[i].dcdy - plane[i].dcdx - plane[i].eo; } @@ -403,25 +399,21 @@ do_triangle_ccw(struct lp_setup_context *setup, plane[3].dcdx = -1; plane[3].dcdy = 0; plane[3].c = 1-bbox.x0; - plane[3].ei = 0; plane[3].eo = 1; plane[4].dcdx = 1; plane[4].dcdy = 0; plane[4].c = bbox.x1+1; - plane[4].ei = -1; plane[4].eo = 0; plane[5].dcdx = 0; plane[5].dcdy = 1; plane[5].c = 1-bbox.y0; - plane[5].ei = 0; plane[5].eo = 1; plane[6].dcdx = 0; plane[6].dcdy = -1; plane[6].c = bbox.y1+1; - plane[6].ei = -1; plane[6].eo = 0; } @@ -544,7 +536,10 @@ lp_setup_bin_triangle( struct lp_setup_context *setup, plane[i].dcdy * iy0 * TILE_SIZE - plane[i].dcdx * ix0 * TILE_SIZE); - ei[i] = plane[i].ei << TILE_ORDER; + ei[i] = (plane[i].dcdy - + plane[i].dcdx - + plane[i].eo) << TILE_ORDER; + eo[i] = plane[i].eo << TILE_ORDER; xstep[i] = -(plane[i].dcdx << TILE_ORDER); ystep[i] = plane[i].dcdy << TILE_ORDER; |