mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-17 10:40:30 +01:00
mesa: generate GL_INVALID_OPERATION in _mesa_get_uniform_location() if program isn't linked
This commit is contained in:
parent
c4b6941e62
commit
294b061256
1 changed files with 5 additions and 0 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue