diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index 9b64427df67..f709bdd702e 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -761,6 +761,22 @@ public: return base_type == GLSL_TYPE_FLOAT; } + /** + * Query whether or not a type is a half-float or float type + */ + bool is_float_16_32() const + { + return base_type == GLSL_TYPE_FLOAT16 || is_float(); + } + + /** + * Query whether or not a type is a half-float, float or double + */ + bool is_float_16_32_64() const + { + return base_type == GLSL_TYPE_FLOAT16 || is_float() || is_double(); + } + /** * Query whether or not a type is a double type */