diff options
author | Timothy Arceri <t_arceri@yahoo.com.au> | 2014-08-18 21:40:50 -1000 |
---|---|---|
committer | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-04-27 21:30:54 +1000 |
commit | fda5f7bb2f23b4adb2f2684162dfb36fe0cb8641 (patch) | |
tree | 4c795748810833a1bb00b232d6f14bf7afaabbe9 /src | |
parent | 9ea38ee96d483a1bc5b525f5452216f454f450ab (diff) | |
download | external_mesa3d-fda5f7bb2f23b4adb2f2684162dfb36fe0cb8641.zip external_mesa3d-fda5f7bb2f23b4adb2f2684162dfb36fe0cb8641.tar.gz external_mesa3d-fda5f7bb2f23b4adb2f2684162dfb36fe0cb8641.tar.bz2 |
glsl: add arrays of arrays support to without_array function
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/glsl_types.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index d383dd5..5645dcd 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; } /** |