[Mesa-dev] [PATCH 04/11] mesa: remove DD_POINT_SMOOTH flag

Brian Paul brianp at vmware.com
Tue Apr 16 18:14:49 PDT 2013


---
 src/mesa/drivers/dri/r200/r200_swtcl.c |    2 +-
 src/mesa/drivers/dri/r200/r200_tcl.c   |    2 +-
 src/mesa/main/debug.c                  |    3 +--
 src/mesa/main/enable.c                 |    1 -
 src/mesa/main/mtypes.h                 |    1 -
 src/mesa/main/state.c                  |    2 --
 6 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index 25bae21..5c6e276 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -318,7 +318,7 @@ static INLINE GLuint reduced_hw_prim( struct gl_context *ctx, GLuint prim)
 {
    switch (prim) {
    case GL_POINTS:
-      return ((!(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ?
+      return ((!ctx->Point.SmoothFlag) ?
 	 R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS);
    case GL_LINES:
    /* fallthrough */
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index 703840d..548947d 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -69,7 +69,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define HAVE_ELTS        1
 
 
-#define HW_POINTS           ((!(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ? \
+#define HW_POINTS           ((!ctx->Point.SmoothFlag) ? \
 				R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS)
 #define HW_LINES            R200_VF_PRIM_LINES
 #define HW_LINE_LOOP        0
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 533c5ed..28da81f 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -100,7 +100,7 @@ void
 _mesa_print_tri_caps( const char *name, GLuint flags )
 {
    _mesa_debug(NULL,
-	   "%s: (0x%x) %s%s%s%s%s%s%s\n",
+	   "%s: (0x%x) %s%s%s%s%s%s\n",
 	   name,
 	   flags,
 	   (flags & DD_TRI_LIGHT_TWOSIDE)   ? "tri-light-twoside, " : "",
@@ -108,7 +108,6 @@ _mesa_print_tri_caps( const char *name, GLuint flags )
 	   (flags & DD_TRI_STIPPLE)         ? "tri-stipple, " : "",
 	   (flags & DD_TRI_OFFSET)          ? "tri-offset, " : "",
 	   (flags & DD_TRI_SMOOTH)          ? "tri-smooth, " : "",
-	   (flags & DD_POINT_SMOOTH)        ? "point-smooth, " : "",
 	   (flags & DD_POINT_ATTEN)         ? "point-atten, " : ""
       );
 }
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index ce92a42..8811929 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -615,7 +615,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
             return;
          FLUSH_VERTICES(ctx, _NEW_POINT);
          ctx->Point.SmoothFlag = state;
-         ctx->_TriangleCaps ^= DD_POINT_SMOOTH;
          break;
       case GL_POLYGON_SMOOTH:
          if (!_mesa_is_desktop_gl(ctx))
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 0b12e48..fa58b17 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3172,7 +3172,6 @@ struct gl_matrix_stack
 #define DD_TRI_SMOOTH               (1 << 3)
 #define DD_TRI_STIPPLE              (1 << 4)
 #define DD_TRI_OFFSET               (1 << 5)
-#define DD_POINT_SMOOTH             (1 << 8)
 #define DD_POINT_ATTEN              (1 << 9)
 /*@}*/
 
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 6578b37..4e66310 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -346,8 +346,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
     * Points
     */
    if (1/*new_state & _NEW_POINT*/) {
-      if (ctx->Point.SmoothFlag)
-         ctx->_TriangleCaps |= DD_POINT_SMOOTH;
       if (ctx->Point._Attenuated)
          ctx->_TriangleCaps |= DD_POINT_ATTEN;
    }
-- 
1.7.3.4



More information about the mesa-dev mailing list