summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2015-10-21 13:37:11 +1100
committerTimothy Arceri <[email protected]>2015-10-21 15:49:17 +1100
commit9a04057ef130e1539aa94babd2e35ce53e6f1e1e (patch)
tree2a383a807ea2697cd0c4852d18d9f1989e342197 /src
parent156b7d3113757eb437dfcfa3ca7ef9b03f3097b2 (diff)
glsl: add is_array_of_arrays() helper
As suggested by Ian Romanick Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/nir/glsl_types.h5
1 files changed, 5 insertions, 0 deletions
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
*/