glsl: add is_array_of_arrays() helper
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 21 Oct 2015 02:37:11 +0000 (13:37 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 21 Oct 2015 04:49:17 +0000 (15:49 +1100)
As suggested by Ian Romanick

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/glsl/nir/glsl_types.h

index 3ec764219de9fdb4ac7bb597a3b484aa216a2c40..52ca8260da7c44a10b23c3ff9c77f97e787a2d50 100644 (file)
@@ -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
     */