[Mesa-dev] [PATCH 2/2] mesa: remove unneeded DD_POINT_SIZE and DD_LINE_WIDTH tricaps

Roland Scheidegger sroland at vmware.com
Mon Nov 8 13:12:05 PST 2010


DD_POINT_SIZE was broken for quite some time, and the only driver (r200) relying
on this no longer needs it.
Both DD_POINT_SIZE and DD_LINE_WIDTH have no users left outside of debugging
output, hence instead of fixing DD_POINT_SIZE setting just drop both of them -
there was a plan to remove tricaps flags entirely at some point.
---
 src/mesa/main/debug.c  |    2 --
 src/mesa/main/lines.c  |    5 -----
 src/mesa/main/mtypes.h |    8 +++-----
 src/mesa/main/state.c  |    4 ----
 4 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index a7e65f8..faee336 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -133,9 +133,7 @@ _mesa_print_tri_caps( const char *name, GLuint flags )
 	   (flags & DD_TRI_SMOOTH)          ? "tri-smooth, " : "",
 	   (flags & DD_LINE_SMOOTH)         ? "line-smooth, " : "",
 	   (flags & DD_LINE_STIPPLE)        ? "line-stipple, " : "",
-	   (flags & DD_LINE_WIDTH)          ? "line-wide, " : "",
 	   (flags & DD_POINT_SMOOTH)        ? "point-smooth, " : "",
-	   (flags & DD_POINT_SIZE)          ? "point-size, " : "",
 	   (flags & DD_POINT_ATTEN)         ? "point-atten, " : "",
 	   (flags & DD_TRI_CULL_FRONT_BACK) ? "cull-all, " : ""
       );
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index 505f840..81e179a 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -54,11 +54,6 @@ _mesa_LineWidth( GLfloat width )
    FLUSH_VERTICES(ctx, _NEW_LINE);
    ctx->Line.Width = width;
 
-   if (width != 1.0F)
-      ctx->_TriangleCaps |= DD_LINE_WIDTH;
-   else
-      ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
-
    if (ctx->Driver.LineWidth)
       ctx->Driver.LineWidth(ctx, width);
 }
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 51378f7..87b9648 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2925,11 +2925,9 @@ struct gl_matrix_stack
 #define DD_TRI_OFFSET               0x80
 #define DD_LINE_SMOOTH              0x100
 #define DD_LINE_STIPPLE             0x200
-#define DD_LINE_WIDTH               0x400
-#define DD_POINT_SMOOTH             0x800
-#define DD_POINT_SIZE               0x1000
-#define DD_POINT_ATTEN              0x2000
-#define DD_TRI_TWOSTENCIL           0x4000
+#define DD_POINT_SMOOTH             0x400
+#define DD_POINT_ATTEN              0x800
+#define DD_TRI_TWOSTENCIL           0x1000
 /*@}*/
 
 
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 05f4165..cce1b46 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -483,8 +483,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
    if (1/*new_state & _NEW_POINT*/) {
       if (ctx->Point.SmoothFlag)
          ctx->_TriangleCaps |= DD_POINT_SMOOTH;
-      if (ctx->Point.Size != 1.0F)
-         ctx->_TriangleCaps |= DD_POINT_SIZE;
       if (ctx->Point._Attenuated)
          ctx->_TriangleCaps |= DD_POINT_ATTEN;
    }
@@ -497,8 +495,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
          ctx->_TriangleCaps |= DD_LINE_SMOOTH;
       if (ctx->Line.StippleFlag)
          ctx->_TriangleCaps |= DD_LINE_STIPPLE;
-      if (ctx->Line.Width != 1.0)
-         ctx->_TriangleCaps |= DD_LINE_WIDTH;
    }
 
    /*
-- 
1.7.0.4



More information about the mesa-dev mailing list