diff options
Diffstat (limited to 'src/compiler/glsl/ast.h')
-rw-r--r-- | src/compiler/glsl/ast.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h index 1be86ac17d9..eee22482812 100644 --- a/src/compiler/glsl/ast.h +++ b/src/compiler/glsl/ast.h @@ -27,6 +27,7 @@ #include "list.h" #include "glsl_parser_extras.h" +#include "compiler/glsl_types.h" struct _mesa_glsl_parse_state; @@ -853,7 +854,7 @@ class ast_type_specifier : public ast_node { public: /** Construct a type specifier from a type name */ ast_type_specifier(const char *name) - : type_name(name), structure(NULL), array_specifier(NULL), + : type(NULL), type_name(name), structure(NULL), array_specifier(NULL), default_precision(ast_precision_none) { /* empty */ @@ -861,12 +862,19 @@ public: /** Construct a type specifier from a structure definition */ ast_type_specifier(ast_struct_specifier *s) - : type_name(s->name), structure(s), array_specifier(NULL), + : type(NULL), type_name(s->name), structure(s), array_specifier(NULL), default_precision(ast_precision_none) { /* empty */ } + ast_type_specifier(const glsl_type *t) + : type(t), type_name(t->name), structure(NULL), array_specifier(NULL), + default_precision(ast_precision_none) + { + /* empty */ + } + const struct glsl_type *glsl_type(const char **name, struct _mesa_glsl_parse_state *state) const; @@ -875,6 +883,7 @@ public: ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *); + const struct glsl_type *type; const char *type_name; ast_struct_specifier *structure; |