From 6a9880224368a016dfb1a9f5b5dfa9284a7dc6cf Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Mon, 19 Sep 2011 15:03:01 +0800 Subject: [PATCH] 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 Signed-off-by: Brian Paul --- src/mesa/main/enable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 4bf1809e7fa..2d857c1481c 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1072,6 +1072,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; -- 2.30.2