Mesa (7.11): mesa: fix incorrect error code in _mesa_FramebufferTexture1D/ 3DEXT()

Ian Romanick idr at kemper.freedesktop.org
Wed Oct 26 01:42:16 UTC 2011


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

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Aug 18 11:51:48 2011 -0600

mesa: fix incorrect error code in _mesa_FramebufferTexture1D/3DEXT()

The spec says GL_INVALID_OPERATION is generated when texture!=0 and
textarget is not a legal value.  We had this right for the 2D function.
(cherry picked from commit ccecc08f79afc020c8c0acface04a8e53e3a7c32)

---

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

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index caa96fc..0b73eab 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1975,7 +1975,7 @@ _mesa_FramebufferTexture1DEXT(GLenum target, GLenum attachment,
    GET_CURRENT_CONTEXT(ctx);
 
    if ((texture != 0) && (textarget != GL_TEXTURE_1D)) {
-      _mesa_error(ctx, GL_INVALID_ENUM,
+      _mesa_error(ctx, GL_INVALID_OPERATION,
                   "glFramebufferTexture1DEXT(textarget)");
       return;
    }
@@ -2013,7 +2013,7 @@ _mesa_FramebufferTexture3DEXT(GLenum target, GLenum attachment,
    GET_CURRENT_CONTEXT(ctx);
 
    if ((texture != 0) && (textarget != GL_TEXTURE_3D)) {
-      _mesa_error(ctx, GL_INVALID_ENUM,
+      _mesa_error(ctx, GL_INVALID_OPERATION,
                   "glFramebufferTexture3DEXT(textarget)");
       return;
    }




More information about the mesa-commit mailing list