From a6ecd1c3724a78b76ab9e81ea39632f1279021f8 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 16 Sep 2010 14:40:26 +0200 Subject: glsl2: Add flags to enable variable index lowering --- src/mesa/program/ir_to_mesa.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/program') diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 227dfdbd50..29b92821f6 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2745,6 +2745,19 @@ _mesa_ir_link_shader(GLcontext *ctx, struct gl_shader_program *prog) if (options->EmitNoNoise) progress = lower_noise(ir) || progress; + /* If there are forms of indirect addressing that the driver + * cannot handle, perform the lowering pass. + */ + if (options->EmitNoIndirectInput || options->EmitNoIndirectOutput + || options->EmitNoIndirectTemp || options->EmitNoIndirectUniform) + progress = + lower_variable_index_to_cond_assign(ir, + options->EmitNoIndirectInput, + options->EmitNoIndirectOutput, + options->EmitNoIndirectTemp, + options->EmitNoIndirectUniform) + || progress; + progress = do_vec_index_to_cond_assign(ir) || progress; } while (progress); -- cgit v1.2.3