diff options
-rw-r--r-- | src/glsl/ast.h | 1 | ||||
-rw-r--r-- | src/glsl/ast_type.cpp | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index de300e719c4..adb5fb11d47 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -418,6 +418,7 @@ public: class ast_fully_specified_type : public ast_node { public: virtual void print(void) const; + bool has_qualifiers() const; ast_type_qualifier qualifier; ast_type_specifier *specifier; diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp index 49dfde20e97..e2510a10c62 100644 --- a/src/glsl/ast_type.cpp +++ b/src/glsl/ast_type.cpp @@ -110,3 +110,13 @@ ast_type_specifier::ast_type_specifier(int specifier) type_name = names[specifier]; } + +bool +ast_fully_specified_type::has_qualifiers() const +{ + return qualifier.invariant || qualifier.constant || qualifier.attribute + || qualifier.varying || qualifier.in + || qualifier.out || qualifier.centroid + || qualifier.uniform || qualifier.smooth + || qualifier.flat || qualifier.noperspective; +} |