glsl: do not add unnamed struct types to the symbol table

We removed the need for lookups, and we will assign them all the same
name in the future.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Nicolai Hähnle
2017-05-14 19:59:27 +02:00
parent 0cb1f25d86
commit 597b2486b8
+1 -1
View File
@@ -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))