summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-10-10 16:26:15 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-10-10 16:34:08 -0600
commit85a3bf6dabc8b2d545dab078516fdfee9c4cd792 (patch)
treeca34ef1bbc360698691eb280bb274e829fcdc117 /src/mesa
parent3210a6d6c7e3d5660d31f6c736e0d0f7e34bcf6d (diff)
mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/shaders.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index aeb5d4ca2a..e5c54bb10d 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -247,7 +247,18 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
}
}
else {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
+ /* error code depends on pname */
+ GLenum err;
+ switch (pname) {
+ case GL_OBJECT_TYPE_ARB:
+ case GL_OBJECT_DELETE_STATUS_ARB:
+ case GL_OBJECT_INFO_LOG_LENGTH_ARB:
+ err = GL_INVALID_OPERATION;
+ break;
+ default:
+ err = GL_INVALID_VALUE;
+ }
+ _mesa_error(ctx, err, "glGetObjectParameterivARB");
}
}