aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_subroutine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: add AoA support to subroutinesTimothy Arceri2015-10-211-1/+1
| | | | | | | | | | | | | | | 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]>
* glsl: check if return_deref in lower_subroutine_visitor::visit_leave isn't NULLKai Wasserbäch2015-08-211-1/+1
| | | | | | | | | Fixes a crash in Piglit's spec@arb_shader_subroutine@[email protected] for me. Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: Initialize parse-state in constructor of lower_subroutine.Matt Turner2015-07-311-3/+3
| | | | | | Static analysis tools don't like partial object initializations. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* glsl/ir: add subroutine lowering pass (v2.3)Dave Airlie2015-07-231-0/+109
This lowers the enhanced ir_call using the lookaside table of subroutines into an if ladder. This initially was done at the AST level but it caused some ordering issues so a separate pass was required. v2: clone return value derefs. v2.1: update for subroutine->int convert. v2.2: add a clone for the array index Reviewed-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>