summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glsl_types.h16
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