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
7dd429e glsl/ir: add subroutine lowering pass (v2.3)
src/glsl/Makefile.sources | 1 +
src/glsl/glsl_parser_extras.cpp | 1 +
src/glsl/ir_optimization.h | 2 +
src/glsl/lower_subroutine.cpp | 109 +++++++++++++++++++++++++++++++++++++++
4 files changed, 113 insertions(+)
Upstream: cgit.freedesktop.org