From: Yuanhan Liu Date: Mon, 19 Sep 2011 07:03:01 +0000 (+0800) Subject: mesa: fix error handling for glIsEnabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a9880224368a016dfb1a9f5b5dfa9284a7dc6cf;p=mesa.git 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 --- 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;