[Mesa-dev] [PATCH] mesa: support arrays of structures in GetProgramResourceIndex

Timothy Arceri t_arceri at yahoo.com.au
Thu Jul 30 02:40:16 PDT 2015


On Thu, 2015-07-30 at 09:44 +0300, Tapani Pälli wrote:
> This fixes a lot of failing tests in:
>    ES31-CTS.program_interface_query.uniform-types
> 
> Signed-off-by: Tapani Pälli <tapani.palli at 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;


It this intended to go in the stable branch?


More information about the mesa-dev mailing list