glsl: Add type queries for fp16+float and fp16+float+double

Following the is_integer_32_64() convention, add is_float_16_32() and
float_16_32_64() for these commonly tested combinations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3929>
This commit is contained in:
Kristian H. Kristensen
2020-03-04 13:57:33 -08:00
committed by Marge Bot
parent ad27eb28d9
commit 198d4a535b

View File

@@ -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
*/