From a2c6df556655e3619f5a0cd82b0d11aac37c5692 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 28 Apr 2010 13:14:53 -0700 Subject: Track and print user defined structure types --- ast_to_hir.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ast_to_hir.cpp') diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index e0913dd9729..357683f0c3d 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -2375,6 +2375,16 @@ ast_struct_specifier::hir(exec_list *instructions, } else { t->generate_constructor(state->symbols); } + + const glsl_type **s = (const glsl_type **) + realloc(state->user_structures, + sizeof(state->user_structures[0]) * + (state->num_user_structures + 1)); + if (s != NULL) { + s[state->num_user_structures] = t; + state->user_structures = s; + state->num_user_structures++; + } } /* Structure type definitions do not have r-values. -- cgit v1.2.3