From: Ian Romanick <ian.d.roman...@intel.com> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> --- src/glsl/ast_to_hir.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d485bc8..c922a84 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -4259,9 +4259,20 @@ ast_uniform_block::hir(exec_list *instructions, * field selector ( . ) operator (analogously to structures)." */ if (this->instance_name) { - ir_variable *var = new(state) ir_variable(block_type, - this->instance_name, - ir_var_uniform); + ir_variable *var; + + if (this->array_size != NULL) { + const glsl_type *block_array_type = + process_array_type(&loc, block_type, this->array_size, state); + + var = new(state) ir_variable(block_array_type, + this->instance_name, + ir_var_uniform); + } else { + var = new(state) ir_variable(block_type, + this->instance_name, + ir_var_uniform); + } var->interface_type = block_type; state->symbols->add_variable(var); -- 1.7.11.7 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev