[Mesa-dev] [PATCH 1/6] mesa: add ARB_enhanced_layouts

Timothy Arceri t_arceri at yahoo.com.au
Fri Nov 6 13:09:55 PST 2015


On Fri, 2015-11-06 at 13:02 +0000, Emil Velikov wrote:
> Hi Tim,
> 
> A few comments below
> 
> On 5 November 2015 at 11:17, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> > From: Timothy Arceri <timothy.arceri at collabora.com>
> > 
> > Set to dummy_false until the remaining features are added.
> > ---
> >  src/glsl/glcpp/glcpp-parse.y    | 1 +
> >  src/glsl/glsl_parser_extras.cpp | 1 +
> >  src/glsl/glsl_parser_extras.h   | 2 ++
> >  src/mesa/main/extensions.c      | 1 +
> >  4 files changed, 5 insertions(+)
> > 
> > diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
> > index 4acccf7..6aa7abe 100644
> > --- a/src/glsl/glcpp/glcpp-parse.y
> > +++ b/src/glsl/glcpp/glcpp-parse.y
> > @@ -2387,6 +2387,7 @@
> > _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t
> > versio
> >            }
> >         } else {
> >            add_builtin_define(parser, "GL_ARB_draw_buffers", 1);
> > +           add_builtin_define(parser, "GL_ARB_enhanced_layouts", 1);
> >             add_builtin_define(parser, "GL_ARB_separate_shader_objects",
> > 1);
> >            add_builtin_define(parser, "GL_ARB_texture_rectangle", 1);
> >             add_builtin_define(parser, "GL_AMD_shader_trinary_minmax", 1);
> > diff --git a/src/glsl/glsl_parser_extras.cpp
> > b/src/glsl/glsl_parser_extras.cpp
> > index 14cb9fc..be344d6 100644
> > --- a/src/glsl/glsl_parser_extras.cpp
> > +++ b/src/glsl/glsl_parser_extras.cpp
> > @@ -594,6 +594,7 @@ static const _mesa_glsl_extension
> > _mesa_glsl_supported_extensions[] = {
> >     EXT(ARB_derivative_control,           true,  false,    
> >  ARB_derivative_control),
> >     EXT(ARB_draw_buffers,                 true,  false,     dummy_true),
> >     EXT(ARB_draw_instanced,               true,  false,    
> >  ARB_draw_instanced),
> > +   EXT(ARB_enhanced_layouts,             true,  false,     dummy_true),
> >     EXT(ARB_explicit_attrib_location,     true,  false,    
> >  ARB_explicit_attrib_location),
> >     EXT(ARB_explicit_uniform_location,    true,  false,    
> >  ARB_explicit_uniform_location),
> >     EXT(ARB_fragment_coord_conventions,   true,  false,    
> >  ARB_fragment_coord_conventions),
> > diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
> > index b54c535..684b917 100644
> > --- a/src/glsl/glsl_parser_extras.h
> > +++ b/src/glsl/glsl_parser_extras.h
> > @@ -499,6 +499,8 @@ struct _mesa_glsl_parse_state {
> >     bool ARB_draw_buffers_warn;
> >     bool ARB_draw_instanced_enable;
> >     bool ARB_draw_instanced_warn;
> > +   bool ARB_enhanced_layouts_enable;
> > +   bool ARB_enhanced_layouts_warn;
> >     bool ARB_explicit_attrib_location_enable;
> >     bool ARB_explicit_attrib_location_warn;
> >     bool ARB_explicit_uniform_location_enable;
> > diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> > index bdc6817..b8556aa 100644
> > --- a/src/mesa/main/extensions.c
> > +++ b/src/mesa/main/extensions.c
> > @@ -111,6 +111,7 @@ static const struct extension extension_table[] = {
> >     { "GL_ARB_draw_elements_base_vertex",          
> >  o(ARB_draw_elements_base_vertex),           GL,             2009 },
> >     { "GL_ARB_draw_indirect",                       o(ARB_draw_indirect), 
> >                       GLC,            2010 },
> >     { "GL_ARB_draw_instanced",                      o(ARB_draw_instanced),
> >                       GL,             2008 },
> > +   { "GL_ARB_enhanced_layouts",                    o(dummy_false),       
> >                       GLC,            2013 },
> >     { "GL_ARB_explicit_attrib_location",           
> >  o(ARB_explicit_attrib_location),            GL,             2009 },
> >     { "GL_ARB_explicit_uniform_location",          
> >  o(ARB_explicit_uniform_location),           GL,             2012 },
> >     { "GL_ARB_fragment_coord_conventions",         
> >  o(ARB_fragment_coord_conventions),          GL,             2009 },
> Please add gl_extensions::ARB_enhanced_layouts and use it in the above
> two tables. Otherwise the extension override won't work.

Are you sure? MESA_EXTENSION_OVERRIDE=GL_ARB_enhanced_layouts has been working
for my testing without it.

>  We can always
> nuke it at the end, if it turns out that this extension can be enabled
> everywhere.
> 
> Thanks
> Emil
> _______________________________________________
> 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