diff options
author | Ian Romanick <[email protected]> | 2010-04-28 13:14:53 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-04-28 18:22:54 -0700 |
commit | a2c6df556655e3619f5a0cd82b0d11aac37c5692 (patch) | |
tree | eab053c496c2fe13e1072b916bde8b7124eadee1 /ast_to_hir.cpp | |
parent | 36d8a64a95354d09685e65c5e721038ff81b6d1f (diff) |
Track and print user defined structure types
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r-- | ast_to_hir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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. |