From 2b70dbfe091af5ae7c788e16275e1af2cb1c284c Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 9 Sep 2010 15:25:32 -0700 Subject: glsl2: Add EmitNoNoise flag, use it to remove noise opcodes --- src/mesa/program/ir_to_mesa.cpp | 3 +++ 1 file changed, 3 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 7307c8506c0..6e7deae4331 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2734,6 +2734,9 @@ _mesa_ir_link_shader(GLcontext *ctx, struct gl_shader_program *prog) if (options->EmitNoIfs) progress = do_if_to_cond_assign(ir) || progress; + if (options->EmitNoNoise) + progress = lower_noise(ir) || progress; + progress = do_vec_index_to_cond_assign(ir) || progress; } while (progress); -- cgit v1.2.3