Use ast_type_specifier::glsl_type to get the type of a constructor
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 31 Mar 2010 23:22:56 +0000 (16:22 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 31 Mar 2010 23:22:56 +0000 (16:22 -0700)
This is the first baby step towards getting array constructors working.

ast_function.cpp

index 36bf0c9cc2d6d1012ca56eb839acb713aeb04d7a..f8c2b6eaa27a345935fa3fb82471ffbbbc3e301b 100644 (file)
@@ -177,9 +177,9 @@ ast_function_expression::hir(exec_list *instructions,
    if (is_constructor()) {
       const ast_type_specifier *type = (ast_type_specifier *) subexpressions[0];
       YYLTYPE loc = type->get_location();
+      const char *name;
 
-      const glsl_type *const constructor_type =
-        state->symbols->get_type(type->type_name);
+      const glsl_type *const constructor_type = type->glsl_type(& name, state);
 
 
       /* Constructors for samplers are illegal.