From: Alejandro PiƱeiro Date: Thu, 7 Mar 2019 10:33:03 +0000 (+0100) Subject: nir_types: add glsl_type_is_struct helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b65fecd8571f2f31633493b6c2d37bedef61c80;p=mesa.git nir_types: add glsl_type_is_struct helper Reviewed-by: Timothy Arceri --- diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index a6c9dbd7192..a1f1198f27e 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -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) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 2c31fa2e43b..c7ded19afb1 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -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);