diff options
author | Timothy Arceri <[email protected]> | 2015-03-12 19:52:47 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-10-15 21:42:24 +1100 |
commit | d1d05c0f85daf3445d9b4c9cebb3940e6a251fa6 (patch) | |
tree | c16639edac32b87745d1d6f835fcadc2443818ff /src/glsl/linker.cpp | |
parent | dd89880dc0924162e751141f9388e5dba089d1c0 (diff) |
glsl: add AoA support for linking interface blocks with unsized members
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index c15034ba904..25ca928aa43 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1387,8 +1387,10 @@ public: virtual ir_visitor_status visit(ir_variable *var) { + const glsl_type *type_without_array; fixup_type(&var->type, var->data.max_array_access, var->data.from_ssbo_unsized_array); + type_without_array = var->type->without_array(); if (var->type->is_interface()) { if (interface_contains_unsized_arrays(var->type)) { const glsl_type *new_type = @@ -1398,11 +1400,10 @@ public: var->type = new_type; var->change_interface_type(new_type); } - } else if (var->type->is_array() && - var->type->fields.array->is_interface()) { - if (interface_contains_unsized_arrays(var->type->fields.array)) { + } else if (type_without_array->is_interface()) { + if (interface_contains_unsized_arrays(type_without_array)) { const glsl_type *new_type = - resize_interface_members(var->type->fields.array, + resize_interface_members(type_without_array, var->get_max_ifc_array_access(), var->is_in_shader_storage_block()); var->change_interface_type(new_type); |