Brian Paul <bri...@vmware.com> writes: > On 01/18/2013 03:30 PM, Eric Anholt wrote: >> This is a step toward getting rid of ASSERT_OUTSIDE_BEGIN_END() in Mesa.
>> diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c >> index 84bcdd6..f987439 100644 >> --- a/src/mesa/vbo/vbo_exec_api.c >> +++ b/src/mesa/vbo/vbo_exec_api.c >> @@ -833,6 +833,17 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode ) >> exec->vtx.prim[i].base_instance = 0; >> >> ctx->Driver.CurrentExecPrimitive = mode; >> + >> + ctx->Exec = ctx->BeginEnd; >> + /* We may have been called from a display list, in which case we should >> + * leave dlist.c's dispatch table in place. >> + */ >> + if (ctx->CurrentDispatch == ctx->OutsideBeginEnd) { >> + ctx->CurrentDispatch = ctx->BeginEnd; >> + _glapi_set_dispatch(ctx->CurrentDispatch); >> + } else { >> + assert(ctx->CurrentDispatch == ctx->Save); >> + } > > If someone did this (in immediate mode): > > glBegin(mode); > glBegin(mode); > > wouldn't the assert in the else clause fail? I think we'd want check > for that before the assertion and raise GL_INVALID_OPERATION there. > I'd have to test to be sure though. This would already be caught by the early-exit for CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END. (it's also covered by the piglit test)
pgpVbicrKFWAh.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev