diff options
author | Kenneth Graunke <[email protected]> | 2013-07-12 22:36:31 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-07-18 16:57:22 -0700 |
commit | eb30af51d68e3cc137dd640e57c81bdda1aae527 (patch) | |
tree | ec22202e69456987f359c353dd8b6f63fe9a2c1f /src/glsl/ast.h | |
parent | 7cef2b22b84aecf9cddf65a3a054fd39e2e9b369 (diff) |
glsl: Add a new ast_type_qualifier::has_storage() method.
This makes it easy to check if any storage qualifiers are set.
"centroid" is not considered a storage qualifier. In the old language
rules, you can't specify "centroid" by itself; it's always "centroid
in", "centroid out", or "centroid varying." So one of the other storage
qualifiers will always be set; there's no need to specifically check for
centroid.
In the new 4.20 rules, centroid is an auxiliary storage qualifier, not a
storage qualifier.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r-- | src/glsl/ast.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 441b389a74a..78d24ae069d 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -463,6 +463,11 @@ struct ast_type_qualifier { bool has_layout() const; /** + * Return whether a storage qualifier is present. + */ + bool has_storage() const; + + /** * \brief Return string representation of interpolation qualifier. * * If an interpolation qualifier is present, then return that qualifier's |