Mesa (master): nir_types: add glsl_type_is_struct helper

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 8 14:01:27 UTC 2019


Module: Mesa
Branch: master
Commit: 2b65fecd8571f2f31633493b6c2d37bedef61c80
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b65fecd8571f2f31633493b6c2d37bedef61c80

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Thu Mar  7 11:33:03 2019 +0100

nir_types: add glsl_type_is_struct helper

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/compiler/nir_types.cpp | 6 ++++++
 src/compiler/nir_types.h   | 1 +
 2 files changed, 7 insertions(+)

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);




More information about the mesa-commit mailing list