summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2011-01-16 21:44:57 -0800
committerChad Versace <[email protected]>2011-01-17 10:20:47 -0800
commit08a286c9cc8fecb081057e0f551c88a446c47b6f (patch)
tree6b8272d30e0d6a8111af47ccf7129c92a543ef0f /src/glsl/ast.h
parent889e1a5b6c6602198d649ea5881e0010dec575e9 (diff)
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.
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r--src/glsl/ast.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 2b9b7861b0f..0e2811ca665 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;
};