diff options
author | Alejandro Piñeiro <[email protected]> | 2019-03-07 11:33:03 +0100 |
---|---|---|
committer | Alejandro Piñeiro <[email protected]> | 2019-03-08 15:00:50 +0100 |
commit | 2b65fecd8571f2f31633493b6c2d37bedef61c80 (patch) | |
tree | 9e712688010b1ea889f95640b1f4edf50750acca | |
parent | 8d693746e99b79a78cc70c42b45e3fea3eaf9180 (diff) |
nir_types: add glsl_type_is_struct helper
Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r-- | src/compiler/nir_types.cpp | 6 | ||||
-rw-r--r-- | src/compiler/nir_types.h | 1 |
2 files changed, 7 insertions, 0 deletions
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 @@ -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(); 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); |