Signed-off-by: Timothy Arceri <t_arc...@yahoo.com.au> --- 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 eeb14c2..f1d578e 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -505,7 +505,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; } /** -- 1.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev