projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3210a6d
)
mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861
author
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 10 Oct 2008 22:26:15 +0000
(16:26 -0600)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 10 Oct 2008 22:34:08 +0000
(16:34 -0600)
src/mesa/main/shaders.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/shaders.c
b/src/mesa/main/shaders.c
index aeb5d4ca2ab48dd9dde07f04b4d553df320d6c94..e5c54bb10d7fb7005f3b7c2e0b95cafa15a3c85b 100644
(file)
--- 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");
}
}