projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b931a0c
)
mesa: generate GL_INVALID_OPERATION in _mesa_get_uniform_location() if program isn...
author
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 4 Jul 2008 15:58:55 +0000
(09:58 -0600)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 4 Jul 2008 16:04:03 +0000
(10:04 -0600)
src/mesa/shader/shader_api.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/shader_api.c
b/src/mesa/shader/shader_api.c
index 3a067fe3e111b4449199baad40d5dd8d7cb66c7c..6cfdf57a494d1913987a4321cef282dc3635cc7f 100644
(file)
--- a/
src/mesa/shader/shader_api.c
+++ b/
src/mesa/shader/shader_api.c
@@
-1011,6
+1011,11
@@
_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name)
if (!shProg)
return -1;
+ if (shProg->LinkStatus == GL_FALSE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(program)");
+ return -1;
+ }
+
/* XXX we should return -1 if the uniform was declared, but not
* actually used.
*/