diff options
author | Nicolai Hähnle <[email protected]> | 2017-05-14 19:58:53 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-06-13 09:35:29 +0200 |
commit | 0cb1f25d86b0be00a84d1c4f3062cd64c4118b42 (patch) | |
tree | 947e4765abd13c9d349455b6b6c1fc20b7f695dc /src/compiler/glsl/glsl_parser_extras.cpp | |
parent | d6ec0aa7edfbe1c86861a4643b6b095a243d24ad (diff) |
glsl: do not lookup struct types by typename
This changes the logic during the conversion of the declaration list
struct S {
...
} v;
from AST to IR, but should not change the end result.
When assigning the type of v, instead of looking `S' up in the symbol
table, we read the type from the member variable of ast_struct_specifier.
This change is necessary for the subsequent change to how anonymous types
are handled.
v2: remove a type override when redefining a structure; should be
the same type in that case anyway
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 0f892b03a13..398bab55dd8 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -1690,6 +1690,7 @@ ast_struct_specifier::ast_struct_specifier(void *lin_ctx, const char *identifier this->declarations.push_degenerate_list_at_head(&declarator_list->link); is_declaration = true; layout = NULL; + type = NULL; } void ast_subroutine_list::print(void) const |