summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-15 11:52:13 -0700
committerBrian Paul <brianp@vmware.com>2010-01-15 11:52:14 -0700
commitadb48d535082f5a311751e1866997e381b2d3038 (patch)
tree9b019c0648cc148dce3b6569b1af43456aa17e03
parent47fee146879aa8ac7f216c8ac5f3a84270266287 (diff)
llvmpipe: remove lp_rast_triangle::min/max fields
These values aren't needed outside the do_triangle_ccw() function.
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c20
2 files changed, 10 insertions, 16 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 2a97fe4c67b..21ebfa7ca91 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -97,12 +97,6 @@ struct lp_rast_shader_inputs {
* Objects of this type are put into the setup_context::data buffer.
*/
struct lp_rast_triangle {
- /* bounding box of tri (in pixels) */
- int minx;
- int maxx;
- int miny;
- int maxy;
-
/* one-pixel sized trivial accept offsets for each plane */
int ei1;
int ei2;
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index e7de6431d38..ae354b3870e 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -288,13 +288,13 @@ do_triangle_ccw(struct setup_context *setup,
}
/* Bounding rectangle (in pixels) */
- tri->minx = (MIN3(x1, x2, x3) + (FIXED_ONE-1)) >> FIXED_ORDER;
- tri->maxx = (MAX3(x1, x2, x3) + (FIXED_ONE-1)) >> FIXED_ORDER;
- tri->miny = (MIN3(y1, y2, y3) + (FIXED_ONE-1)) >> FIXED_ORDER;
- tri->maxy = (MAX3(y1, y2, y3) + (FIXED_ONE-1)) >> FIXED_ORDER;
+ minx = (MIN3(x1, x2, x3) + (FIXED_ONE-1)) >> FIXED_ORDER;
+ maxx = (MAX3(x1, x2, x3) + (FIXED_ONE-1)) >> FIXED_ORDER;
+ miny = (MIN3(y1, y2, y3) + (FIXED_ONE-1)) >> FIXED_ORDER;
+ maxy = (MAX3(y1, y2, y3) + (FIXED_ONE-1)) >> FIXED_ORDER;
- if (tri->miny == tri->maxy ||
- tri->minx == tri->maxx) {
+ if (miny == maxy ||
+ minx == maxx) {
lp_scene_putback_data( scene, sizeof *tri );
return;
}
@@ -384,10 +384,10 @@ do_triangle_ccw(struct setup_context *setup,
/* Convert to tile coordinates:
*/
- minx = tri->minx / TILE_SIZE;
- miny = tri->miny / TILE_SIZE;
- maxx = tri->maxx / TILE_SIZE;
- maxy = tri->maxy / TILE_SIZE;
+ minx = minx / TILE_SIZE;
+ miny = miny / TILE_SIZE;
+ maxx = maxx / TILE_SIZE;
+ maxy = maxy / TILE_SIZE;
/* Clamp maxx, maxy to framebuffer size
*/