Mesa (master): mesa/st: remove duplicate offset calculation

Keith Whitwell keithw at kemper.freedesktop.org
Tue Apr 28 17:17:40 UTC 2009


Module: Mesa
Branch: master
Commit: 106f2b031cbb83a54fa2949cb07357ecea68b92a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=106f2b031cbb83a54fa2949cb07357ecea68b92a

Author: Keith Whitwell <keithw at vmware.com>
Date:   Tue Apr 28 14:51:11 2009 +0100

mesa/st: remove duplicate offset calculation

---

 src/mesa/state_tracker/st_atom_rasterizer.c |   17 +----------------
 src/mesa/state_tracker/st_context.h         |    2 --
 2 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 61687fb..4e70510 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -180,22 +180,7 @@ static void update_raster_state( struct st_context *st )
 
    if (ctx->Polygon.StippleFlag)
       raster->poly_stipple_enable = 1;
-
-
-   /* _NEW_BUFFERS, _NEW_POLYGON
-    */
-   if (raster->fill_cw != PIPE_POLYGON_MODE_FILL ||
-       raster->fill_ccw != PIPE_POLYGON_MODE_FILL)
-   {
-      GLfloat mrd = (ctx->DrawBuffer ? 
-		     ctx->DrawBuffer->_MRD : 
-		     1.0f);
-
-      raster->offset_units = ctx->Polygon.OffsetFactor * mrd;
-      raster->offset_scale = (ctx->Polygon.OffsetUnits * mrd *
-			    st->polygon_offset_scale);
-   }
-      
+     
    /* _NEW_POINT
     */
    raster->point_size = ctx->Point.Size;
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index f840579..6ffed56 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -120,8 +120,6 @@ struct st_context
 
    GLboolean missing_textures;
 
-   GLfloat polygon_offset_scale; /* ?? */
-
    /** Mapping from VERT_RESULT_x to post-transformed vertex slot */
    const GLuint *vertex_result_to_slot;
 




More information about the mesa-commit mailing list