nir/types: Add a few more glsl_type_is_ functions

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Jason Ekstrand 2016-02-11 22:03:48 -08:00
parent 914829f766
commit f05f576803
2 changed files with 21 additions and 0 deletions

View File

@ -157,6 +157,12 @@ glsl_type_is_void(const glsl_type *type)
return type->is_void();
}
bool
glsl_type_is_error(const glsl_type *type)
{
return type->is_error();
}
bool
glsl_type_is_vector(const struct glsl_type *type)
{
@ -181,6 +187,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

@ -78,10 +78,13 @@ unsigned glsl_get_record_location_offset(const struct glsl_type *type,
unsigned length);
bool glsl_type_is_void(const struct glsl_type *type);
bool glsl_type_is_error(const struct glsl_type *type);
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_type_is_image(const struct glsl_type *type);
bool glsl_sampler_type_is_shadow(const struct glsl_type *type);