summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index c67dfe5e88c..b1e490eefd9 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -7509,7 +7509,7 @@ ast_struct_specifier::hir(exec_list *instructions,
type = glsl_type::get_record_instance(fields, decl_count, this->name);
- if (!state->symbols->add_type(name, type)) {
+ if (!type->is_anonymous() && !state->symbols->add_type(name, type)) {
const glsl_type *match = state->symbols->get_type(name);
/* allow struct matching for desktop GL - older UE4 does this */
if (match != NULL && state->is_version(130, 0) && match->record_compare(type, false))