diff options
author | marha <marha@users.sourceforge.net> | 2013-07-12 08:25:37 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-12 08:25:37 +0200 |
commit | 66b46719d55e60d53b42858770d6ac40d079ab13 (patch) | |
tree | aad06d011ed8b820685f72ada34e56ee0f2580c6 /mesalib/src/glsl/ast_to_hir.cpp | |
parent | f8f0209a691e0d0838d1ef9d602ebacafee2a233 (diff) | |
parent | ffce4319c2fb6f4f663cc5a9660e1d5837fcde87 (diff) | |
download | vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.tar.gz vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.tar.bz2 vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libxtrans fontconfig mesa xserver git update 12 Jul 2013
Diffstat (limited to 'mesalib/src/glsl/ast_to_hir.cpp')
-rw-r--r-- | mesalib/src/glsl/ast_to_hir.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp index cbd9ea357..01203134d 100644 --- a/mesalib/src/glsl/ast_to_hir.cpp +++ b/mesalib/src/glsl/ast_to_hir.cpp @@ -1068,6 +1068,10 @@ ast_expression::hir(exec_list *instructions, loc = this->get_location(); switch (this->oper) { + case ast_aggregate: + assert(!"ast_aggregate: Should never get here."); + break; + case ast_assign: { op[0] = this->subexpressions[0]->hir(instructions, state); op[1] = this->subexpressions[1]->hir(instructions, state); @@ -4001,7 +4005,19 @@ ast_type_specifier::hir(exec_list *instructions, return NULL; } - if (this->structure != NULL) + /* _mesa_ast_set_aggregate_type() sets the <structure> field so that + * process_record_constructor() can do type-checking on C-style initializer + * expressions of structs, but ast_struct_specifier should only be translated + * to HIR if it is declaring the type of a structure. + * + * The ->is_declaration field is false for initializers of variables + * declared separately from the struct's type definition. + * + * struct S { ... }; (is_declaration = true) + * struct T { ... } t = { ... }; (is_declaration = true) + * S s = { ... }; (is_declaration = false) + */ + if (this->structure != NULL && this->structure->is_declaration) return this->structure->hir(instructions, state); return NULL; @@ -4229,6 +4245,8 @@ ast_interface_block::hir(exec_list *instructions, var_mode = ir_var_uniform; iface_type_name = "uniform"; } else { + var_mode = ir_var_auto; + iface_type_name = "UNKNOWN"; assert(!"interface block layout qualifier not found!"); } |