Signed-off-by: Abdiel Janulgue <abdiel.janul...@linux.intel.com> --- src/glsl/nir/nir_types.cpp | 6 ++++++ src/glsl/nir/nir_types.h | 2 ++ 2 files changed, 8 insertions(+)
diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp index 940c676..a0caf0e 100644 --- a/src/glsl/nir/nir_types.cpp +++ b/src/glsl/nir/nir_types.cpp @@ -165,3 +165,9 @@ glsl_array_type(const glsl_type *base, unsigned elements) { return glsl_type::get_array_instance(base, elements); } + +unsigned +glsl_get_array_size(const struct glsl_type *type) +{ + return type->array_size(); +} diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h index a8ff8f2..72b980a 100644 --- a/src/glsl/nir/nir_types.h +++ b/src/glsl/nir/nir_types.h @@ -51,6 +51,8 @@ const struct glsl_type *glsl_get_column_type(const struct glsl_type *type); enum glsl_base_type glsl_get_base_type(const struct glsl_type *type); +unsigned glsl_get_array_size(const struct glsl_type *type); + unsigned glsl_get_vector_elements(const struct glsl_type *type); unsigned glsl_get_components(const struct glsl_type *type); -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev