mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 17:50:29 +01:00
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 <caio.oliveira@intel.com>
This commit is contained in:
parent
96d6156678
commit
8792abff9d
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue