[Piglit] [PATCH 3/5] util: Add u/byte, u/short and half support to [vertex data]

Andres Gomez agomez at igalia.com
Thu Jun 30 09:22:49 UTC 2016


On Wed, 2016-06-29 at 14:33 -0700, Dylan Baker wrote:
> I swear I sent your review comments this morning, but they don't seem
> to
> have made it to the list

I received it, though.

> 
> [snip]
> 
> >        return (glsl_version, glsl_version_int)
> > +
> > +  def _glsl_to_gl(glsl_type):
> > +      if glsl_type.startswith("d"):
> > +          return "double"
> > +      elif glsl_type.startswith("u"):
> > +          return "uint"
> > +      elif glsl_type.startswith("i"):
> > +          return "int"
> > +      else:
> > +          return "float"
> 
> You don't need this function (especially because you remove it later)

Right.

The reason for adding it is to avoid a regression between this patch
and the following one. Since the function was meant for removal, I
didn't put much effort on it.

> 
> >  %>
> >  <% glsl, glsl_int = _version(ver) %>
> >  
> > @@ -88,16 +98,16 @@ void main()
> >  [vertex data]
> >  % for idx, in_type in enumerate(in_types):
> >    % if idx == position_order - 1:
> > -    piglit_vertex/vec3/3 \
> > +    piglit_vertex/float/vec3 \
> >    % endif
> >    % for i in range(arrays[idx]):
> >      % for j in range(in_type.columns):
> > -    value${idx}${'[{}]'.format(i) if arrays[idx] > 1 else
> > ''}/${in_type.name}/${(in_type.rows)}${'/{}'.format(j) if
> > (in_type.columns or 0) > 1 else ''} \
> > +    value${idx}${'[{}]'.format(i) if arrays[idx] > 1 else
> > ''}/${_glsl_to_gl(in_type.name)}/${in_type.name}${'/{}'.format(j)
> > if (in_type.columns or 0) > 1 else ''} \
> 
> Replace _glsl_to_gl(in_type.name) with in_type.type.name

Will do.

Thanks!

-- 
-- 

Br,

Andres


More information about the Piglit mailing list