mesa: remove unused PRIM_INSIDE_UNKNOWN_PRIM constant
authorBrian Paul <brianp@vmware.com>
Thu, 2 May 2013 01:15:32 +0000 (19:15 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 2 May 2013 15:03:15 +0000 (09:03 -0600)
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mapi/glapi/gen/gl_enums.py
src/mesa/main/dd.h
src/mesa/main/dlist.c
src/mesa/main/mtypes.h
src/mesa/vbo/vbo_save_api.c

index 3bd511edcc862a5dd66b0ff2471cdca6b9471e5d..497eeee4d5dfcee11bb1a376560127955464d99b 100644 (file)
@@ -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"
 };
 
index 1e5aca13a48fc66857df9b2dbe556a4e093aad50..916f38bd8c10feab79600c6a159049201a0c9c3a 100644 (file)
@@ -685,10 +685,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;
 
index 57f862be2af22a73fd342db76a4199a21eed3371..3dd676bc23bb4972c2e876cfe6285f3fd161f2c6 100644 (file)
@@ -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;                                                          \
    }                                                                   \
index 14b3c5beda05f85c4b56d8a2874fa606325729d1..b37c6ab66e54bbdc02322ffa738163ea9348eb49 100644 (file)
@@ -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)
 
 
 
index 52293ce09a597ae24112a26ba708c822583c0c36..4fae37a2afe4b6d0613c201f73564c6bd4753d72 100644 (file)
@@ -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)