Mesa (master): nir: wrapper for glsl_type arrays_of_arrays_size()

Timothy Arceri tarceri at kemper.freedesktop.org
Fri Oct 16 21:43:34 UTC 2015


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

Author: Timothy Arceri <t_arceri at yahoo.com.au>
Date:   Thu Jul 23 08:31:59 2015 +1000

nir: wrapper for glsl_type arrays_of_arrays_size()

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick at 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 da9807f..965f423 100644
--- a/src/glsl/nir/nir_types.cpp
+++ b/src/glsl/nir/nir_types.cpp
@@ -106,6 +106,12 @@ glsl_get_length(const struct glsl_type *type)
    return type->is_matrix() ? type->matrix_columns : type->length;
 }
 
+unsigned
+glsl_get_aoa_size(const struct glsl_type *type)
+{
+   return type->arrays_of_arrays_size();
+}
+
 const char *
 glsl_get_struct_elem_name(const struct glsl_type *type, unsigned index)
 {
diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h
index 49d6a65..009a0fb 100644
--- a/src/glsl/nir/nir_types.h
+++ b/src/glsl/nir/nir_types.h
@@ -59,6 +59,8 @@ unsigned glsl_get_matrix_columns(const struct glsl_type *type);
 
 unsigned glsl_get_length(const struct glsl_type *type);
 
+unsigned glsl_get_aoa_size(const struct glsl_type *type);
+
 const char *glsl_get_struct_elem_name(const struct glsl_type *type,
                                       unsigned index);
 




More information about the mesa-commit mailing list