diff options
author | Chad Versace <[email protected]> | 2011-01-11 16:59:24 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-01-17 09:41:24 -0800 |
commit | 0e2f8936c8ef872cb464e54a9f09ae0324487147 (patch) | |
tree | 8dc8259289ca4067512c5c73bac027d91232bdfe /src/glsl/ast.h | |
parent | 5a64626ee57183a404827e2cda8359db3529b180 (diff) |
glsl: Add method ast_type_qualifier::interpolation_string()
If an interpolation qualifier is present, then the method returns that
qualifier's string representation. For example, if the noperspective bit
is set, then it returns "noperspective".
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r-- | src/glsl/ast.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index cd933cfc588..c096f9aa876 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -364,6 +364,18 @@ struct ast_type_qualifier { * This field is only valid if \c explicit_location is set. */ unsigned location; + + /** + * \brief Return string representation of interpolation qualifier. + * + * If an interpolation qualifier is present, then return that qualifier's + * string representation. Otherwise, return null. For example, if the + * noperspective bit is set, then this returns "noperspective". + * + * If multiple interpolation qualifiers are somehow present, then the + * returned string is undefined but not null. + */ + const char *interpolation_string() const; }; class ast_struct_specifier : public ast_node { |