From f6b03f323500c71fc20c0d64c618d9aa73ced5b4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 31 Jul 2010 15:47:35 -0700 Subject: [PATCH] glsl2: Do algebraic optimizations after linking as well. Linking brings in inlining of builtins, so we weren't catching the (rcp(/sqrt(x)) -> rsq(x)) without it. --- src/glsl/linker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 9b47e4788fc..9d53197fdda 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1289,6 +1289,7 @@ link_shaders(struct gl_shader_program *prog) progress = do_tree_grafting(ir) || progress; progress = do_constant_variable_unlinked(ir) || progress; progress = do_constant_folding(ir) || progress; + progress = do_algebraic(ir) || progress; progress = do_if_return(ir) || progress; #if 0 if (ctx->Shader.EmitNoIfs) -- 2.30.2