summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h3
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_line.c8
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_point.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c13
5 files changed, 8 insertions, 26 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 8d8b6210ec7..a64c152cf83 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -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;
};
/**
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
index 9976996719a..4825d651c04 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
@@ -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,
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c
index 2fd9f2e2f2a..ece8638b5a6 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_line.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c
@@ -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;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index e30e70e16d2..16d21df35e2 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -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;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 937821b4c3a..6ceda80a716 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;