diff options
author | Antia Puentes <[email protected]> | 2018-08-08 17:52:04 +0200 |
---|---|---|
committer | Alejandro PiƱeiro <[email protected]> | 2019-07-12 23:42:41 +0200 |
commit | 8792abff9de8a6767fdd97bd4b5d0c3a1ef1b1e2 (patch) | |
tree | 282ccda0a220231eca4bfd12e1e104947223a30e /src | |
parent | 96d6156678929d3d480fca3b4458767df31f4ee7 (diff) |
mesa/uniforms: Fix GetUniformLocation (ARB_gl_spirv)
From the ARB_gl_spirv specification, glGetUniformLocation should
return -1 when no name reflection is available.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/uniforms.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 3b7249aabb5..116fab21cb9 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -1007,7 +1007,7 @@ _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name) shProg = _mesa_lookup_shader_program_err(ctx, programObj, "glGetUniformLocation"); - if (!shProg) + if (!shProg || !name) return -1; /* Page 80 (page 94 of the PDF) of the OpenGL 2.1 spec says: |