[Mesa-dev] [PATCH 02/19] glsl: Fix block name of built-in gl_PerVertex interface block.

Paul Berry stereotype441 at gmail.com
Tue Oct 8 14:11:39 PDT 2013


On 5 October 2013 12:10, Kenneth Graunke <kenneth at whitecape.org> wrote:

> On 10/02/2013 05:45 PM, Paul Berry wrote:
> > Previously, we erroneously used the name "gl_in" for both the block
> > name and the instance name.
> > ---
> >  src/glsl/builtin_variables.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/glsl/builtin_variables.cpp
> b/src/glsl/builtin_variables.cpp
> > index 3667dc8..91518ba 100644
> > --- a/src/glsl/builtin_variables.cpp
> > +++ b/src/glsl/builtin_variables.cpp
> > @@ -827,7 +827,7 @@ builtin_variable_generator::generate_varyings()
> >           glsl_type::get_interface_instance(this->per_vertex_fields,
> >                                             this->num_per_vertex_fields,
> >
> GLSL_INTERFACE_PACKING_STD140,
> > -                                           "gl_in");
> > +                                           "gl_PerVertex");
> >        ir_variable *var = add_variable("gl_in", array(per_vertex_type,
> 0),
> >                                        ir_var_shader_in, -1);
> >        var->init_interface_type(per_vertex_type);
>
> It would be fantastic if you could update the prototype in glsl_types.h to
> say "block_name" instead of "name" for the parameter:
>
>    /**
>     * Get the instance of an interface block type
>     */
>    static const glsl_type *get_interface_instance(const glsl_struct_field
> *fields,
>                                                   unsigned num_fields,
>                                                   enum
> glsl_interface_packing packing,
>                                                   const char *name);
>
> With just "name", it's not obvious which is supposed to be passed here.
>

Sure.  That's easily separable from this series so I'll do it in an
independent patch.


>
> Either way, patches 1-2 are:
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131008/f8e8cc26/attachment-0001.html>


More information about the mesa-dev mailing list