From fda5f7bb2f23b4adb2f2684162dfb36fe0cb8641 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Mon, 18 Aug 2014 21:40:50 -1000 Subject: [PATCH] glsl: add arrays of arrays support to without_array function Signed-off-by: Timothy Arceri Reviewed-by: Ilia Mirkin --- src/glsl/glsl_types.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index d383dd5bef1..5645dcd5011 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -540,7 +540,12 @@ struct glsl_type { */ const glsl_type *without_array() const { - return this->is_array() ? this->fields.array : this; + const glsl_type *t = this; + + while (t->is_array()) + t = t->fields.array; + + return t; } /** -- 2.30.2