This fixes a lot of failing tests in: ES31-CTS.program_interface_query.uniform-types
Signed-off-by: Tapani Pälli <tapani.pa...@intel.com> --- src/mesa/main/program_resource.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/program_resource.c b/src/mesa/main/program_resource.c index 641ef22..6c0a923 100644 --- a/src/mesa/main/program_resource.c +++ b/src/mesa/main/program_resource.c @@ -212,13 +212,16 @@ valid_program_resource_index_name(const GLchar *name) { const char *array = strstr(name, "["); const char *close = strrchr(name, ']'); + const char *after = close ? close + 1 : NULL; /* Not array, no need for the check. */ if (!array) return true; - /* Last array index has to be zero. */ - if (!close || *--close != '0') + /* Last array index has to be zero, for the exception when + * dealing with arrays of structures. + */ + if (!close || (*--close != '0' && *after != '.')) return false; return true; -- 2.1.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev