summaryrefslogtreecommitdiff
path: root/glsl_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'glsl_types.h')
-rw-r--r--glsl_types.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/glsl_types.h b/glsl_types.h
index e05130102a..9af8e9d3f8 100644
--- a/glsl_types.h
+++ b/glsl_types.h
@@ -42,9 +42,6 @@
#define is_numeric_base_type(b) \
(((b) >= GLSL_TYPE_UINT) && ((b) <= GLSL_TYPE_FLOAT))
-#define is_integer_base_type(b) \
- (((b) == GLSL_TYPE_UINT) || ((b) == GLSL_TYPE_INT))
-
#define is_error_type(t) ((t)->base_type == GLSL_TYPE_ERROR)
enum glsl_sampler_dim {
@@ -204,6 +201,14 @@ struct glsl_type {
}
/**
+ * Query whether or not a type is an integral type
+ */
+ bool is_integer() const
+ {
+ return (base_type == GLSL_TYPE_UINT) || (base_type == GLSL_TYPE_INT);
+ }
+
+ /**
* Query whether or not a type is a non-array boolean type
*/
bool is_boolean() const