*/
const glsl_type *get_float16_type() const;
+ /**
+ * Gets the int16 version of this type.
+ */
+ const glsl_type *get_int16_type() const;
+
+ /**
+ * Gets the uint16 version of this type.
+ */
+ const glsl_type *get_uint16_type() const;
+
/**
* Get the instance of a built-in scalar, vector, or matrix type
*/
return glsl_base_type_is_integer(base_type);
}
+ /**
+ * Query whether or not a type is a 16-bit integer.
+ */
+ bool is_integer_16() const
+ {
+ return base_type == GLSL_TYPE_UINT16 || base_type == GLSL_TYPE_INT16;
+ }
+
/**
* Query whether or not a type is an 32-bit integer.
*/
return is_integer_32() || is_integer_64();
}
+ /**
+ * Query whether or not a type is a 16-bit or 32-bit integer
+ */
+ bool is_integer_16_32() const
+ {
+ return is_integer_16() || is_integer_32() || is_integer_64();
+ }
+
+ /**
+ * Query whether or not a type is a 16-bit, 32-bit or 64-bit integer
+ */
+ bool is_integer_16_32_64() const
+ {
+ return is_integer_16() || is_integer_32() || is_integer_64();
+ }
+
/**
* Query whether or not type is an integral type, or for struct and array
* types, contains an integral type.
return base_type == GLSL_TYPE_FLOAT16 || is_float() || is_double();
}
+ /**
+ * Query whether or not a type is a float or double
+ */
+ bool is_float_32_64() const
+ {
+ return is_float() || is_double();
+ }
+
+ bool is_int_16_32_64() const
+ {
+ return base_type == GLSL_TYPE_INT16 ||
+ base_type == GLSL_TYPE_INT ||
+ base_type == GLSL_TYPE_INT64;
+ }
+
+ bool is_uint_16_32_64() const
+ {
+ return base_type == GLSL_TYPE_UINT16 ||
+ base_type == GLSL_TYPE_UINT ||
+ base_type == GLSL_TYPE_UINT64;
+ }
+
+ bool is_int_16_32() const
+ {
+ return base_type == GLSL_TYPE_INT ||
+ base_type == GLSL_TYPE_INT16;
+ }
+
+ bool is_uint_16_32() const
+ {
+ return base_type == GLSL_TYPE_UINT ||
+ base_type == GLSL_TYPE_UINT16;
+ }
+
/**
* Query whether or not a type is a double type
*/