summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorYuanhan Liu <yuanhan.liu@linux.intel.com>2011-09-19 15:03:01 +0800
committerBrian Paul <brianp@vmware.com>2011-09-19 08:11:52 -0600
commit6a9880224368a016dfb1a9f5b5dfa9284a7dc6cf (patch)
treed79109e037f6159c8ac59d98f6a2a242ef344c3e /src/mesa
parentb020b111a82266743d2cc501195defe687657e96 (diff)
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 <yuanhan.liu@linux.intel.com> Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/enable.c2
1 files changed, 2 insertions, 0 deletions
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;