mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 18:30:09 +01:00
mesa: add missing error check in _mesa_EndList()
If we're in GL_COMPILE_AND_EXECUTE mode and inside glBegin, calling glEndList() should generate an error. Fixes a failure in piglit's gl-1.0-beginend-coverage test. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
c1a5c5c13d
commit
94c7caf406
1 changed files with 6 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue