[Mesa-dev] [PATCH 07/14] mesa: add missing error check in _mesa_EndList()

Ian Romanick idr at freedesktop.org
Wed Apr 24 23:45:38 PDT 2013


On 04/25/2013 02:32 AM, Brian Paul wrote:
> If we're in GL_COMPILE_AND_EXECUTE mode and inside glBegin, calling
> glEndList() should generate an error.

I wasn't aware that was an error.  Is there some spec language that 
could be quoted in the code for that?

> Fixes a failure in piglit's gl-1.0-beginend-coverage test.
> ---
>   src/mesa/main/dlist.c |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
> index 3dd676b..882163e 100644
> --- a/src/mesa/main/dlist.c
> +++ b/src/mesa/main/dlist.c
> @@ -8652,6 +8652,12 @@ _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) {
> +      _mesa_error(ctx, GL_INVALID_OPERATION,
> +                  "glEndList() called inside glBegin/End");
> +   }
> +
>      /* Check that a list is under construction */
>      if (!ctx->ListState.CurrentList) {
>         _mesa_error(ctx, GL_INVALID_OPERATION, "glEndList");
>



More information about the mesa-dev mailing list