From adb48d535082f5a311751e1866997e381b2d3038 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 15 Jan 2010 11:52:13 -0700 Subject: llvmpipe: remove lp_rast_triangle::min/max fields These values aren't needed outside the do_triangle_ccw() function. --- src/gallium/drivers/llvmpipe/lp_rast.h | 6 ------ src/gallium/drivers/llvmpipe/lp_setup_tri.c | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 16 deletions(-) (limited to 'src/gallium/drivers/llvmpipe') diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index 2a97fe4c67..21ebfa7ca9 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 e7de6431d3..ae354b3870 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 */ -- cgit v1.2.3