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

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


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

Author: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Date:   Mon Sep 19 15:03:00 2011 +0800

mesa: fix error handling for glTexEnv

Fix error handling while calling glTexEnv with invalid texture
environment parameters.

Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Signed-off-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit b020b111a82266743d2cc501195defe687657e96)

---

 src/mesa/main/texenv.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index c0d0f37..1df3890 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -731,7 +731,8 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit,
       break;
 
    default:
-      ;
+      _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
+      break;
    }
 
    return -1; /* error */



More information about the mesa-commit mailing list