From 9a04057ef130e1539aa94babd2e35ce53e6f1e1e Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 21 Oct 2015 13:37:11 +1100 Subject: [PATCH] glsl: add is_array_of_arrays() helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As suggested by Ian Romanick Reviewed-by: Tapani Pälli --- 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.7.4