Signed-off-by: Timothy Arceri <[email protected]>
---
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 7359e94..f5bc846 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -534,7 +534,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.1.0
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev