diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 16:17:15 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 16:17:15 -0700 |
commit | 70348543ac8f2c4d3d25996869461c53ea82b6a8 (patch) | |
tree | 1ba695874a5e6885d71e06532dad5a5738f72faf | |
parent | 8a24cd5ceaf74a9be5954b5f7426b1612ce8ecd3 (diff) |
Add glsl_type::is_array and glsl_type::is_float queries
-rw-r--r-- | glsl_types.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/glsl_types.h b/glsl_types.h index 68a32efde6..bb2d6f697b 100644 --- a/glsl_types.h +++ b/glsl_types.h @@ -224,6 +224,14 @@ struct glsl_type { } /** + * Query whether or not a type is a float type + */ + bool is_float() const + { + return base_type == GLSL_TYPE_FLOAT; + } + + /** * Query whether or not a type is a non-array boolean type */ bool is_boolean() const @@ -240,6 +248,14 @@ struct glsl_type { } /** + * Query whether or not a type is an array + */ + bool is_array() const + { + return base_type == GLSL_TYPE_ARRAY; + } + + /** * Query whether or not a type is the void type singleton. */ bool is_void() const |