[Mesa-dev] [PATCH 14/27] nir: Add glsl_get_element_type() wrapper.

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Tue Apr 28 13:08:11 PDT 2015


Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/glsl/nir/nir_types.cpp | 5 +++++
 src/glsl/nir/nir_types.h   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp
index f0d0b46..249678f 100644
--- a/src/glsl/nir/nir_types.cpp
+++ b/src/glsl/nir/nir_types.cpp
@@ -82,6 +82,11 @@ glsl_get_base_type(const struct glsl_type *type)
    return type->base_type;
 }
 
+const struct glsl_type *
+glsl_get_element_type(const struct glsl_type *type)
+{
+   return type->element_type();
+}
 unsigned
 glsl_get_vector_elements(const struct glsl_type *type)
 {
diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h
index 276d4ad..125f075 100644
--- a/src/glsl/nir/nir_types.h
+++ b/src/glsl/nir/nir_types.h
@@ -49,6 +49,8 @@ const struct glsl_type *glsl_get_array_element(const struct glsl_type *type);
 
 const struct glsl_type *glsl_get_column_type(const struct glsl_type *type);
 
+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_vector_elements(const struct glsl_type *type);
-- 
1.9.1



More information about the mesa-dev mailing list