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

Timothy Arceri t_arceri at yahoo.com.au
Thu Jul 30 02:48:21 PDT 2015


On Thu, 2015-07-30 at 19:40 +1000, Timothy Arceri wrote:
> 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?

Hit send too early.

If this is intended to land in the stable branch also then:

Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au> also we will need to Cc
stable on both patches.

Otherwise I'd rather just land my cleanup unless you see any issues with it.

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list