nir_types: add glsl_type_is_struct helper
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 7 Mar 2019 10:33:03 +0000 (11:33 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 8 Mar 2019 14:00:50 +0000 (15:00 +0100)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir_types.cpp
src/compiler/nir_types.h

index a6c9dbd..a1f1198 100644 (file)
@@ -284,6 +284,12 @@ glsl_type_is_array_or_matrix(const struct glsl_type *type)
 }
 
 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)
 {
    return type->is_struct() || type->is_interface();
index 2c31fa2..c7ded19 100644 (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);