glsl: add AoA support to subroutines
authorTimothy Arceri <t_arceri@yahoo.com.au>
Wed, 5 Aug 2015 05:49:22 +0000 (15:49 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 21 Oct 2015 03:56:57 +0000 (14:56 +1100)
commitfd01840c0bd3b22d058a65a17ad30e3b45813b60
treeeed8c7c0acdbfb1871ca3328ce892e576b70ebef
parenta59c1adcc665b70ca5a8fbfebe3f0d6e05ad2778
glsl: add AoA support to subroutines

process_parameters() will now be called earlier because we need
actual_parameters processed earlier so we can use it with
match_subroutine_by_name() to get the subroutine variable, we need
to do this inside the recursive function generate_array_index() because
we can't create the ir_dereference_array() until we have gotten to the
outermost array.

For the remainder of the array dimensions the type doesn't matter so we
can just use the existing _mesa_ast_array_index_to_hir() function to
process the ast.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/glsl/ast_function.cpp
src/glsl/lower_subroutine.cpp