summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-01-21 22:49:39 -0500
committerIan Romanick <[email protected]>2013-01-25 09:07:34 -0500
commit9a204bb9f611e34396ea838b44517dd6eeb99bcc (patch)
tree6e977fd00b378c08803264115b643daeb3fd514f
parent141e9d42f518fb113dcaf01fcb0c82b14726ebd6 (diff)
glsl: Add new uniform_field_visitor::visit_field variant
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/glsl/link_uniforms.cpp7
-rw-r--r--src/glsl/linker.h10
2 files changed, 17 insertions, 0 deletions
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