Module: Mesa Branch: 7.11 Commit: 0ebdfa31bc2156c251c2ebc6ddf1964ac1f58765 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ebdfa31bc2156c251c2ebc6ddf1964ac1f58765
Author: Yuanhan Liu <[email protected]> Date: Mon Sep 19 15:03:01 2011 +0800 mesa: fix error handling for glIsEnabled According the man page, GL_INVALID_OPERATION should be generated if glIsEnabled is executed betwwen the execution of glBegin and the correspoding execution of glEnd. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]> (cherry picked from commit 6a9880224368a016dfb1a9f5b5dfa9284a7dc6cf) --- src/mesa/main/enable.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index aac8b9c..d3f38ec 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1082,6 +1082,8 @@ GLboolean GLAPIENTRY _mesa_IsEnabled( GLenum cap ) { GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); + switch (cap) { case GL_ALPHA_TEST: return ctx->Color.AlphaEnabled; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
