mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 10:48:21 +02:00
glsl2: Don't generate constructor functions for structures
This commit is contained in:
parent
37200d83d3
commit
a789ca649c
2 changed files with 2 additions and 3 deletions
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue