[Mesa-dev] [PATCH 06/14] mesa: remove unused PRIM_INSIDE_UNKNOWN_PRIM constant

Brian Paul brianp at vmware.com
Wed Apr 24 17:32:20 PDT 2013


---
 src/mapi/glapi/gen/gl_enums.py |    1 -
 src/mesa/main/dd.h             |    7 +++----
 src/mesa/main/dlist.c          |    6 ++----
 src/mesa/main/mtypes.h         |    3 +--
 src/mesa/vbo/vbo_save_api.c    |    3 +--
 5 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 3bd511e..497eeee 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -126,7 +126,6 @@ static const char *prim_names[PRIM_UNKNOWN + 1] = {
    "GL_QUAD_STRIP",
    "GL_POLYGON",
    "outside begin/end",
-   "inside unknown primitive",
    "unknown state"
 };
 
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 76411b3..9e9752f 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -683,10 +683,9 @@ struct dd_function_table {
    GLuint CurrentExecPrimitive;
 
    /**
-    * Current state of an in-progress compilation.  
-    *
-    * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
-    * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
+    * Current glBegin state of an in-progress compilation.  May be
+    * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
+    * or PRIM_UNKNOWN.
     */
    GLuint CurrentSavePrimitive;
 
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 57f862b..3dd676b 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -122,8 +122,7 @@ do {						\
  */
 #define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval)		\
 do {									\
-   if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX ||			\
-       ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) {	\
+   if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) {			\
       _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" );	\
       return retval;							\
    }									\
@@ -137,8 +136,7 @@ do {									\
  */
 #define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx)				\
 do {									\
-   if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX ||			\
-       ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) {	\
+   if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) {			\
       _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" );	\
       return;								\
    }									\
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4356ab0..0d0296c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -87,8 +87,7 @@ struct set_entry;
 /** Extra draw modes beyond GL_POINTS, GL_TRIANGLE_FAN, etc */
 #define PRIM_MAX                 GL_TRIANGLE_STRIP_ADJACENCY
 #define PRIM_OUTSIDE_BEGIN_END   (PRIM_MAX + 1)
-#define PRIM_INSIDE_UNKNOWN_PRIM (PRIM_MAX + 2)
-#define PRIM_UNKNOWN             (PRIM_MAX + 3)
+#define PRIM_UNKNOWN             (PRIM_MAX + 2)
 
 
 
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 52293ce..4fae37a 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1515,8 +1515,7 @@ vbo_save_SaveFlushVertices(struct gl_context *ctx)
 
    /* Noop when we are actually active:
     */
-   if (ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM ||
-       ctx->Driver.CurrentSavePrimitive <= PRIM_MAX)
+   if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX)
       return;
 
    if (save->vert_count || save->prim_count)
-- 
1.7.3.4



More information about the mesa-dev mailing list