summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_array_splitting.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2013-10-23 21:31:27 +1100
committerPaul Berry <[email protected]>2013-10-28 06:06:04 -0700
commitb59c5926cb0a5981a2e553c68e36312be7f122f9 (patch)
tree556c64ed9adfed50c64c841b8d51d490b8200072 /src/glsl/opt_array_splitting.cpp
parent5cd7eb9f071a02c8252f49ef1fbe59d7319ed503 (diff)
glsl: Add check for unsized arrays to glsl types
The main purpose of this patch is to increase readability of the array code by introducing is_unsized_array() to glsl_types. Some redundent is_array() checks are also removed, and small number of other related clean ups. The introduction of is_unsized_array() should also make the ARB_arrays_of_arrays code simpler and more readable when it arrives. V2: Also replace code that checks for unsized arrays directly with the length variable Signed-off-by: Timothy Arceri <[email protected]> v3 (Paul Berry <[email protected]>): clean up formatting. Separate whitespace cleanups to their own patch. Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/opt_array_splitting.cpp')
-rw-r--r--src/glsl/opt_array_splitting.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_array_splitting.cpp b/src/glsl/opt_array_splitting.cpp
index 34ac836ae5c..c7c5f671265 100644
--- a/src/glsl/opt_array_splitting.cpp
+++ b/src/glsl/opt_array_splitting.cpp
@@ -132,7 +132,7 @@ ir_array_reference_visitor::get_variable_entry(ir_variable *var)
/* If the array hasn't been sized yet, we can't split it. After
* linking, this should be resolved.
*/
- if (var->type->is_array() && var->type->length == 0)
+ if (var->type->is_unsized_array())
return NULL;
foreach_iter(exec_list_iterator, iter, this->variable_list) {