[Mesa-dev] [PATCH 1/2] glsl: add is_array_of_arrays() helper

Timothy Arceri timothy.arceri at collabora.com
Tue Oct 20 20:23:58 PDT 2015


As suggested by Ian Romanick

Cc: Tapani Pälli <tapani.palli at intel.com>
---
 src/glsl/nir/glsl_types.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/glsl/nir/glsl_types.h b/src/glsl/nir/glsl_types.h
index 3ec7642..52ca826 100644
--- a/src/glsl/nir/glsl_types.h
+++ b/src/glsl/nir/glsl_types.h
@@ -513,6 +513,11 @@ struct glsl_type {
       return base_type == GLSL_TYPE_ARRAY;
    }
 
+   bool is_array_of_arrays() const
+   {
+      return is_array() && fields.array->is_array();
+   }
+
    /**
     * Query whether or not a type is a record
     */
-- 
2.4.3



More information about the mesa-dev mailing list