From: Timothy Arceri Date: Wed, 21 Oct 2015 02:37:11 +0000 (+1100) Subject: glsl: add is_array_of_arrays() helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a04057ef130e1539aa94babd2e35ce53e6f1e1e;p=mesa.git glsl: add is_array_of_arrays() helper As suggested by Ian Romanick Reviewed-by: Tapani Pälli --- diff --git a/src/glsl/nir/glsl_types.h b/src/glsl/nir/glsl_types.h index 3ec764219de..52ca8260da7 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 */