Mesa (master): nir: Add a C wrapper for glsl_type::is_array_of_arrays().

Kenneth Graunke kwg at kemper.freedesktop.org
Sat Nov 19 21:30:16 UTC 2016


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Oct 12 00:13:55 2016 -0700

nir: Add a C wrapper for glsl_type::is_array_of_arrays().

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 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 5b04e18..cc90efd 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -185,6 +185,12 @@ glsl_type_is_array(const struct glsl_type *type)
 }
 
 bool
+glsl_type_is_array_of_arrays(const struct glsl_type *type)
+{
+   return type->is_array_of_arrays();
+}
+
+bool
 glsl_type_is_struct(const struct glsl_type *type)
 {
    return type->is_record() || type->is_interface();
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 57f4708..9088a06 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -108,6 +108,7 @@ bool glsl_type_is_scalar(const struct glsl_type *type);
 bool glsl_type_is_vector_or_scalar(const struct glsl_type *type);
 bool glsl_type_is_matrix(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_struct(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