nir: add glsl_type_is_32bit() helper
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
7b01d5c354
commit
e041123841
|
@ -584,6 +584,16 @@ public:
|
|||
return glsl_base_type_is_16bit(base_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is 32-bit
|
||||
*/
|
||||
bool is_32bit() const
|
||||
{
|
||||
return base_type == GLSL_TYPE_UINT ||
|
||||
base_type == GLSL_TYPE_INT ||
|
||||
base_type == GLSL_TYPE_FLOAT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is a non-array boolean type
|
||||
*/
|
||||
|
|
|
@ -204,6 +204,12 @@ glsl_type_is_16bit(const glsl_type *type)
|
|||
return type->is_16bit();
|
||||
}
|
||||
|
||||
bool
|
||||
glsl_type_is_32bit(const glsl_type *type)
|
||||
{
|
||||
return type->is_32bit();
|
||||
}
|
||||
|
||||
bool
|
||||
glsl_type_is_64bit(const glsl_type *type)
|
||||
{
|
||||
|
|
|
@ -131,6 +131,7 @@ glsl_get_bit_size(const struct glsl_type *type)
|
|||
}
|
||||
|
||||
bool glsl_type_is_16bit(const struct glsl_type *type);
|
||||
bool glsl_type_is_32bit(const struct glsl_type *type);
|
||||
bool glsl_type_is_64bit(const struct glsl_type *type);
|
||||
bool glsl_type_is_void(const struct glsl_type *type);
|
||||
bool glsl_type_is_error(const struct glsl_type *type);
|
||||
|
|
Loading…
Reference in New Issue