diff options
author | Samuel Iglesias Gonsalvez <siglesias@igalia.com> | 2015-05-13 12:18:31 +0200 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-06-12 16:28:46 +0100 |
commit | ea3d26eeb4db1a8510e5a99c702d5b9db828973d (patch) | |
tree | f27bdff2d6734afd84f6ff4ef012712d374117d1 | |
parent | 39aa6b8bea1383c7fe1ff04a3637248a3bbe4fc5 (diff) | |
download | mesa-ea3d26eeb4db1a8510e5a99c702d5b9db828973d.tar.gz |
mesa/main: validate name syntax for array variables only
From ARB_program_interface_query:
"Note that if an interface enumerates a single active resource list
entry for an array variable (e.g., "a[0]"), a <name> identifying
any array element other than the first (e.g., "a[1]") is not
considered to match."
It doesn't apply to arrays of interface blocks but just to array
variables.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 4ee69a97bb0af0cc216539c48b246ea2abf8f208)
-rw-r--r-- | src/mesa/main/program_resource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/program_resource.c b/src/mesa/main/program_resource.c index b15a13210c0..d857b84e60d 100644 --- a/src/mesa/main/program_resource.c +++ b/src/mesa/main/program_resource.c @@ -220,12 +220,12 @@ _mesa_GetProgramResourceIndex(GLuint program, GLenum programInterface, case GL_PROGRAM_INPUT: case GL_PROGRAM_OUTPUT: case GL_UNIFORM: - case GL_UNIFORM_BLOCK: case GL_TRANSFORM_FEEDBACK_VARYING: - /* Validate name syntax for arrays. */ + /* Validate name syntax for array variables */ if (!valid_program_resource_index_name(name)) return GL_INVALID_INDEX; - + /* fall-through */ + case GL_UNIFORM_BLOCK: res = _mesa_program_resource_find_name(shProg, programInterface, name); if (!res) return GL_INVALID_INDEX; |