summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaders.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-10-10 16:40:16 -0600
committerBrian Paul <[email protected]>2008-10-10 16:40:16 -0600
commit2a6c6fe01e84ffd54b47ea11aa766960df6ddcaf (patch)
treed0cab73abfa138f30cb74371bbb16060893b6c07 /src/mesa/main/shaders.c
parent01e312a73b68dc5ddffca0d1b1472fc5dcb6f59e (diff)
parent24748268a3ac7bedc2c9ae5bf76c4c741d539f80 (diff)
Merge commit 'origin/master' into gallium-0.2
Diffstat (limited to 'src/mesa/main/shaders.c')
-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 aeb5d4ca2ab..e5c54bb10d7 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");
}
}