Commit
4565b6f did not update the basename match's check for
the case that string would exactly match the name of the
variable if the suffix "[0]" were appended to it.
Fixes two dEQP-GLES31 tests:
dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array
dEQP-GLES31.functional.program_interface_query.shader_storage_block.resource_list.block_array_single_element
v2:
- Change the position of rname_has_array_index_zero to avoid an out-of-bounds
read. Reported by Tapani Pälli.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
case GL_UNIFORM_BLOCK:
case GL_SHADER_STORAGE_BLOCK:
/* Basename match, check if array or struct. */
- if (name[baselen] == '\0' ||
+ if (rname_has_array_index_zero ||
+ name[baselen] == '\0' ||
name[baselen] == '[' ||
name[baselen] == '.') {
return res;