mesa: fix CurrentSavePrimitive <= GL_POLYGON tests

Use the new PRIM_MAX value instead so that new geometry shader primitive
types are accounted for.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
Brian Paul
2013-05-01 19:15:32 -06:00
parent cce6e30613
commit 8be093e2f6
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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; \
+1 -1
View File
@@ -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)