linker: Add a last_field parameter to various program_resource_visitor methods

I also considered renaming visit_field(const glsl_struct_field *) to
entry_record and adding an exit_record method.  This would be more
similar to the hierarchical visitor.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Ian Romanick
2014-07-16 15:37:10 -07:00
parent 46356c46ea
commit 47c6fc5b04
3 changed files with 30 additions and 16 deletions

View File

@@ -68,7 +68,8 @@ private:
}
virtual void visit_field(const glsl_type *type, const char *name,
bool row_major, const glsl_type *record_type)
bool row_major, const glsl_type *record_type,
bool last_field)
{
assert(this->index < this->num_variables);