[Mesa-dev] [PATCH 15/27] nir: Add glsl_get_array_size() wrapper.
Abdiel Janulgue
abdiel.janulgue at linux.intel.com
Tue Apr 28 13:08:12 PDT 2015
Signed-off-by: Abdiel Janulgue <abdiel.janulgue at 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 249678f..7218eeb 100644
--- a/src/glsl/nir/nir_types.cpp
+++ b/src/glsl/nir/nir_types.cpp
@@ -164,3 +164,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 125f075..32e18f3 100644
--- a/src/glsl/nir/nir_types.h
+++ b/src/glsl/nir/nir_types.h
@@ -53,6 +53,8 @@ const struct glsl_type *glsl_get_element_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
More information about the mesa-dev
mailing list