From 9a204bb9f611e34396ea838b44517dd6eeb99bcc Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 21 Jan 2013 22:49:39 -0500 Subject: [PATCH] glsl: Add new uniform_field_visitor::visit_field variant Signed-off-by: Ian Romanick Reviewed-by: Carl Worth Reviewed-by: Kenneth Graunke --- src/glsl/link_uniforms.cpp | 7 +++++++ src/glsl/linker.h | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 90d46da0721..c15bb30afe5 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 0ad217f841c..95937d4ee87 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 -- 2.30.2