summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-04-23 13:34:14 +1000
committerDave Airlie <airlied@redhat.com>2015-07-23 17:25:37 +1000
commit7dd429e8f74302d44af00d051e59911439152369 (patch)
tree981cfd00a26af8bc66bad43b0890825d2ca6912a /src/glsl/glsl_parser_extras.cpp
parent65ac360823ee12ac2d1f3bb6758d352fcd0d9210 (diff)
downloadexternal_mesa3d-7dd429e8f74302d44af00d051e59911439152369.zip
external_mesa3d-7dd429e8f74302d44af00d051e59911439152369.tar.gz
external_mesa3d-7dd429e8f74302d44af00d051e59911439152369.tar.bz2
glsl/ir: add subroutine lowering pass (v2.3)
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 <chrisf@ijw.co.nz> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 59a312f..46896d7 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1617,6 +1617,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
struct gl_shader_compiler_options *options =
&ctx->Const.ShaderCompilerOptions[shader->Stage];
+ lower_subroutine(shader->ir, state);
/* Do some optimization at compile time to reduce shader IR size
* and reduce later work if the same shader is linked multiple times
*/