nir_types: add glsl_type_is_struct helper

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Alejandro Piñeiro 2019-03-07 11:33:03 +01:00
parent 8d693746e9
commit 2b65fecd85
2 changed files with 7 additions and 0 deletions

View file

@ -283,6 +283,12 @@ glsl_type_is_array_or_matrix(const struct glsl_type *type)
return type->is_array() || type->is_matrix();
}
bool
glsl_type_is_struct(const struct glsl_type *type)
{
return type->is_struct();
}
bool
glsl_type_is_struct_or_ifc(const struct glsl_type *type)
{

View file

@ -144,6 +144,7 @@ bool glsl_matrix_type_is_row_major(const struct glsl_type *type);
bool glsl_type_is_array(const struct glsl_type *type);
bool glsl_type_is_array_of_arrays(const struct glsl_type *type);
bool glsl_type_is_array_or_matrix(const struct glsl_type *type);
bool glsl_type_is_struct(const struct glsl_type *type);
bool glsl_type_is_struct_or_ifc(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);