summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-31 15:47:35 -0700
committerEric Anholt <[email protected]>2010-07-31 15:52:24 -0700
commitf6b03f323500c71fc20c0d64c618d9aa73ced5b4 (patch)
treebd60265477ac7361f790ea0900d39dceb74f3891 /src/glsl/linker.cpp
parent784695442c415cf0be882434a25671ecfb635d34 (diff)
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.
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp1
1 files changed, 1 insertions, 0 deletions
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)