"GL_QUAD_STRIP",
"GL_POLYGON",
"outside begin/end",
- "inside unknown primitive",
"unknown state"
};
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;
*/
#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; \
} \
*/
#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; \
} \
/** 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)
/* 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)