diff options
author | Timothy Arceri <[email protected]> | 2015-08-05 15:49:22 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-10-21 14:56:57 +1100 |
commit | fd01840c0bd3b22d058a65a17ad30e3b45813b60 (patch) | |
tree | eed8c7c0acdbfb1871ca3328ce892e576b70ebef /src/glsl/lower_subroutine.cpp | |
parent | a59c1adcc665b70ca5a8fbfebe3f0d6e05ad2778 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/glsl/lower_subroutine.cpp')
-rw-r--r-- | src/glsl/lower_subroutine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/lower_subroutine.cpp b/src/glsl/lower_subroutine.cpp index c1aed61a36a..a0df5e1df81 100644 --- a/src/glsl/lower_subroutine.cpp +++ b/src/glsl/lower_subroutine.cpp @@ -84,7 +84,7 @@ lower_subroutine_visitor::visit_leave(ir_call *ir) continue; if (ir->array_idx != NULL) - var = new(mem_ctx) ir_dereference_array(ir->sub_var, ir->array_idx->clone(mem_ctx, NULL)); + var = ir->array_idx->clone(mem_ctx, NULL); else var = new(mem_ctx) ir_dereference_variable(ir->sub_var); |