summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.h2
-rw-r--r--src/mesa/main/dlist.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 9b2dffb979d..8e0e88a3920 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -207,7 +207,7 @@ _mesa_inside_begin_end(const struct gl_context *ctx)
static inline GLboolean
_mesa_inside_dlist_begin_end(const struct gl_context *ctx)
{
- return ctx->Driver.CurrentSavePrimitive != PRIM_OUTSIDE_BEGIN_END;
+ return ctx->Driver.CurrentSavePrimitive <= PRIM_MAX;
}
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 73d35fe891d..0d12e306656 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -5657,8 +5657,7 @@ save_Begin(GLenum mode)
/* compile this error into the display list */
_mesa_compile_error(ctx, GL_INVALID_ENUM, "glBegin(mode)");
}
- else if (_mesa_inside_dlist_begin_end(ctx) &&
- ctx->Driver.CurrentSavePrimitive != PRIM_UNKNOWN) {
+ else if (_mesa_inside_dlist_begin_end(ctx)) {
/* compile this error into the display list */
_mesa_compile_error(ctx, GL_INVALID_OPERATION, "recursive glBegin");
}
@@ -8659,8 +8658,7 @@ _mesa_EndList(void)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glEndList\n");
- if (ctx->ExecuteFlag && _mesa_inside_dlist_begin_end(ctx)
- && ctx->Driver.CurrentSavePrimitive != PRIM_UNKNOWN) {
+ if (ctx->ExecuteFlag && _mesa_inside_dlist_begin_end(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glEndList() called inside glBegin/End");
}