llvmpipe: don't store plane.ei value in binned data

Further reduce the size of a binned triangle.
This commit is contained in:
Keith Whitwell 2010-10-15 13:04:19 +01:00
parent 9bf8a55c4b
commit 8965f042b3
5 changed files with 8 additions and 26 deletions

View file

@ -100,9 +100,6 @@ struct lp_rast_plane {
/* one-pixel sized trivial reject offsets for each plane */
int eo;
/* one-pixel sized trivial accept offsets for each plane */
int ei;
};
/**

View file

@ -82,7 +82,8 @@ TAG(do_block_16)(struct lp_rasterizer_task *task,
const int dcdx = -plane[j].dcdx * 4;
const int dcdy = plane[j].dcdy * 4;
const int cox = plane[j].eo * 4;
const int cio = plane[j].ei * 4 - 1;
const int ei = plane[j].dcdy - plane[j].dcdx - plane[j].eo;
const int cio = ei * 4 - 1;
build_masks(c[j] + cox,
cio - cox,
@ -181,7 +182,8 @@ TAG(lp_rast_triangle)(struct lp_rasterizer_task *task,
const int dcdx = -plane[j].dcdx * 16;
const int dcdy = plane[j].dcdy * 16;
const int cox = plane[j].eo * 16;
const int cio = plane[j].ei * 16 - 1;
const int ei = plane[j].dcdy - plane[j].dcdx - plane[j].eo;
const int cio = ei * 16 - 1;
build_masks(c[j] + cox,
cio - cox,

View file

@ -654,10 +654,6 @@ try_setup_line( 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;
}
@ -683,25 +679,21 @@ try_setup_line( struct lp_setup_context *setup,
plane[4].dcdx = -1;
plane[4].dcdy = 0;
plane[4].c = 1-bbox.x0;
plane[4].ei = 0;
plane[4].eo = 1;
plane[5].dcdx = 1;
plane[5].dcdy = 0;
plane[5].c = bbox.x1+1;
plane[5].ei = -1;
plane[5].eo = 0;
plane[6].dcdx = 0;
plane[6].dcdy = 1;
plane[6].c = 1-bbox.y0;
plane[6].ei = 0;
plane[6].eo = 1;
plane[7].dcdx = 0;
plane[7].dcdy = -1;
plane[7].c = bbox.y1+1;
plane[7].ei = -1;
plane[7].eo = 0;
}

View file

@ -386,25 +386,21 @@ try_setup_point( struct lp_setup_context *setup,
plane[0].dcdx = -1;
plane[0].dcdy = 0;
plane[0].c = 1-bbox.x0;
plane[0].ei = 0;
plane[0].eo = 1;
plane[1].dcdx = 1;
plane[1].dcdy = 0;
plane[1].c = bbox.x1+1;
plane[1].ei = -1;
plane[1].eo = 0;
plane[2].dcdx = 0;
plane[2].dcdy = 1;
plane[2].c = 1-bbox.y0;
plane[2].ei = 0;
plane[2].eo = 1;
plane[3].dcdx = 0;
plane[3].dcdy = -1;
plane[3].c = bbox.y1+1;
plane[3].ei = -1;
plane[3].eo = 0;
}

View file

@ -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;