From aaa31bf8f44e1aab0e87160661196b0a16e1d015 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Fri, 14 Jan 2011 09:50:55 -0800 Subject: glsl: Change default value of ast_type_specifier::precision Change default value to ast_precision_none, which denotes the absence of a precision of a qualifier. Previously, the default value was ast_precision_high. This made it impossible to detect if a precision qualifier was present or not. --- src/glsl/ast.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/glsl/ast.h') diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 523a38937a..2b9b7861b0 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -318,7 +318,8 @@ public: enum { - ast_precision_high = 0, /**< Default precision. */ + ast_precision_none = 0, /**< Absence of precision qualifier. */ + ast_precision_high, ast_precision_medium, ast_precision_low }; @@ -461,7 +462,7 @@ 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_high) + is_array(false), array_size(NULL), precision(ast_precision_none) { /* empty */ } @@ -469,7 +470,7 @@ 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_high) + is_array(false), array_size(NULL), precision(ast_precision_none) { /* empty */ } -- cgit v1.2.3