From: Ian Romanick Date: Tue, 22 Jan 2013 03:49:39 +0000 (-0500) Subject: glsl: Add new uniform_field_visitor::visit_field variant X-Git-Tag: mesa-9.1-rc1~115 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a204bb9f611e34396ea838b44517dd6eeb99bcc;p=platform%2Fupstream%2Fmesa.git glsl: Add new uniform_field_visitor::visit_field variant Signed-off-by: Ian Romanick Reviewed-by: Carl Worth Reviewed-by: Kenneth Graunke --- diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 90d46da..c15bb30 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -113,6 +113,13 @@ uniform_field_visitor::recursion(const glsl_type *t, char **name, } } +void +uniform_field_visitor::visit_field(const glsl_struct_field *field) +{ + (void) field; + /* empty */ +} + /** * Class to help calculate the storage requirements for a set of uniforms * diff --git a/src/glsl/linker.h b/src/glsl/linker.h index 0ad217f..95937d4 100644 --- a/src/glsl/linker.h +++ b/src/glsl/linker.h @@ -95,6 +95,16 @@ protected: virtual void visit_field(const glsl_type *type, const char *name, bool row_major) = 0; + /** + * Visit a record before visiting its fields + * + * For structures-of-structures or interfaces-of-structures, this visits + * the inner structure before visiting its fields. + * + * The default implementation does nothing. + */ + virtual void visit_field(const glsl_struct_field *field); + private: /** * \param name_length Length of the current name \b not including the