diff options
author | Ian Romanick <[email protected]> | 2010-09-01 14:08:08 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-09-01 20:39:09 -0700 |
commit | a789ca649cb143c0c5bf3209ff1bde398fbd777e (patch) | |
tree | 3c015354d16e3b28c6283cc5b71af09e0ac20b9f /src/glsl | |
parent | 37200d83d3e61aa480e6dbb350e522bd0388644c (diff) |
glsl2: Don't generate constructor functions for structures
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 3 | ||||
-rw-r--r-- | src/glsl/glsl_symbol_table.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 84aa6501c55..970ac0818e8 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2730,8 +2730,7 @@ ast_struct_specifier::hir(exec_list *instructions, glsl_type::get_record_instance(fields, decl_count, name); YYLTYPE loc = this->get_location(); - ir_function *ctor = t->generate_constructor(); - if (!state->symbols->add_type(name, t, ctor)) { + if (!state->symbols->add_type(name, t)) { _mesa_glsl_error(& loc, state, "struct `%s' previously defined", name); } else { diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp index ed71244cbf8..c71f3f830c3 100644 --- a/src/glsl/glsl_symbol_table.cpp +++ b/src/glsl/glsl_symbol_table.cpp @@ -127,7 +127,7 @@ bool glsl_symbol_table::add_function(const char *name, ir_function *f) if (this->language_version == 110 && name_declared_this_scope(name)) { /* In 1.10, functions and variables have separate namespaces. */ symbol_table_entry *existing = get_entry(name); - if (existing->f == NULL) { + if ((existing->f == NULL) && (existing->t == NULL)) { existing->f = f; return true; } |