nir/types: add more nir_type_is_xxx() wrappers

This commit is contained in:
Connor Abbott 2015-07-15 21:58:32 -07:00 committed by Jason Ekstrand
parent a1e136711b
commit c62be38286
2 changed files with 14 additions and 0 deletions

View File

@ -168,6 +168,18 @@ glsl_type_is_matrix(const struct glsl_type *type)
return type->is_matrix();
}
bool
glsl_type_is_array(const struct glsl_type *type)
{
return type->is_array();
}
bool
glsl_type_is_struct(const struct glsl_type *type)
{
return type->is_record() || type->is_interface();
}
bool
glsl_type_is_sampler(const struct glsl_type *type)
{

View File

@ -76,6 +76,8 @@ bool glsl_type_is_vector(const struct glsl_type *type);
bool glsl_type_is_scalar(const struct glsl_type *type);
bool glsl_type_is_vector_or_scalar(const struct glsl_type *type);
bool glsl_type_is_matrix(const struct glsl_type *type);
bool glsl_type_is_array(const struct glsl_type *type);
bool glsl_type_is_struct(const struct glsl_type *type);
bool glsl_type_is_sampler(const struct glsl_type *type);
bool glsl_sampler_type_is_shadow(const struct glsl_type *type);
bool glsl_sampler_type_is_array(const struct glsl_type *type);