Use the new PRIM_MAX value instead so that new geometry shader primitive
types are accounted for.
---
 src/mesa/main/dlist.c       |    4 ++--
 src/mesa/vbo/vbo_save_api.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 3071a37..9eb13fb 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -122,7 +122,7 @@ do {                                                \
  */
 #define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval)         \
 do {                                                                   \
-   if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON ||               \
+   if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX ||                 \
        ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \
       _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
       return retval;                                                   \
@@ -137,7 +137,7 @@ do {                                                        
                \
  */
 #define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx)                             \
 do {                                                                   \
-   if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON ||               \
+   if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX ||                 \
        ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \
       _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
       return;                                                          \
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 7ede8f4..52293ce 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1516,7 +1516,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 <= GL_POLYGON)
+       ctx->Driver.CurrentSavePrimitive <= PRIM_MAX)
       return;
 
    if (save->vert_count || save->prim_count)
-- 
1.7.3.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to