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:
Antia Puentes 2018-08-08 17:52:04 +02:00 committed by Alejandro Piñeiro
parent 96d6156678
commit 8792abff9d

View file

@ -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: