From 08a286c9cc8fecb081057e0f551c88a446c47b6f Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Sun, 16 Jan 2011 21:44:57 -0800 Subject: glsl: Add support for default precision statements * Add new field ast_type_specifier::is_precision_statement. * Add semantic checks in ast_type_specifier::hir(). * Alter parser rules accordingly. --- src/glsl/ast.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/glsl/ast.h') diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 2b9b7861b0..0e2811ca66 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -462,7 +462,8 @@ public: /** Construct a type specifier from a type name */ ast_type_specifier(const char *name) : type_specifier(ast_type_name), type_name(name), structure(NULL), - is_array(false), array_size(NULL), precision(ast_precision_none) + is_array(false), array_size(NULL), precision(ast_precision_none), + is_precision_statement(false) { /* empty */ } @@ -470,7 +471,8 @@ public: /** Construct a type specifier from a structure definition */ ast_type_specifier(ast_struct_specifier *s) : type_specifier(ast_struct), type_name(s->name), structure(s), - is_array(false), array_size(NULL), precision(ast_precision_none) + is_array(false), array_size(NULL), precision(ast_precision_none), + is_precision_statement(false) { /* empty */ } @@ -492,6 +494,8 @@ public: ast_expression *array_size; unsigned precision:2; + + bool is_precision_statement; }; -- cgit v1.2.3