Mesa (7.11): mesa: fix error handling for glIsEnabled

Ian Romanick idr at kemper.freedesktop.org
Mon Oct 24 15:54:48 PDT 2011


Module: Mesa
Branch: 7.11
Commit: 0ebdfa31bc2156c251c2ebc6ddf1964ac1f58765
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ebdfa31bc2156c251c2ebc6ddf1964ac1f58765

Author: Yuanhan Liu <yuanhan.liu at linux.intel.com>
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 <yuanhan.liu at linux.intel.com>
Signed-off-by: Brian Paul <brianp at vmware.com>
(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;



More information about the mesa-commit mailing list