projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96d6156
)
mesa/uniforms: Fix GetUniformLocation (ARB_gl_spirv)
author
Antia Puentes
<apuentes@igalia.com>
Wed, 8 Aug 2018 15:52:04 +0000
(17:52 +0200)
committer
Alejandro Piñeiro
<apinheiro@igalia.com>
Fri, 12 Jul 2019 21:42:41 +0000
(23:42 +0200)
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>
src/mesa/main/uniforms.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/uniforms.c
b/src/mesa/main/uniforms.c
index 3b7249aabb5ce2478c5f80f4bfec6c397bbac99a..116fab21cb97b94b382ea5531c8d014b97680521 100644
(file)
--- 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: