[Mesa-dev] [PATCH] main: fix basename match's check if it's an array or struct

Tapani Pälli tapani.palli at intel.com
Tue Oct 27 22:53:47 PDT 2015


On 10/27/2015 04:04 PM, Samuel Iglesias Gonsalvez wrote:
> 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

These tests are passing already with commit 4565b6f right? I think the 
'found' boolean already takes care of this, I need to step through again 
to make sure though. This function is becoming a bit of a pain because 
different resources have different naming schemes, I'll have to see if 
it could be somehow refactored simpler.

> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
> ---
>   src/mesa/main/shader_query.cpp | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
> index 59ec3d7..6cc91de 100644
> --- a/src/mesa/main/shader_query.cpp
> +++ b/src/mesa/main/shader_query.cpp
> @@ -592,7 +592,8 @@ _mesa_program_resource_find_name(struct gl_shader_program *shProg,
>               /* Basename match, check if array or struct. */
>               if (name[baselen] == '\0' ||
>                   name[baselen] == '[' ||
> -                name[baselen] == '.') {
> +                name[baselen] == '.' ||
> +                rname_has_array_index_zero) {
>                  return res;
>               }
>               break;



More information about the mesa-dev mailing list