Mesa (lp-binning): llvmpipe: remove lp_rast_triangle::min/max fields

Brian Paul brianp at kemper.freedesktop.org
Fri Jan 15 11:06:47 PST 2010


Module: Mesa
Branch: lp-binning
Commit: adb48d535082f5a311751e1866997e381b2d3038
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=adb48d535082f5a311751e1866997e381b2d3038

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Jan 15 11:52:13 2010 -0700

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(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 2a97fe4..21ebfa7 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 e7de643..ae354b3 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
     */



More information about the mesa-commit mailing list