Mesa (glsl2): glsl2: Do algebraic optimizations after linking as well.
Eric Anholt
anholt at kemper.freedesktop.org
Sun Aug 1 01:00:14 UTC 2010
Module: Mesa
Branch: glsl2
Commit: f6b03f323500c71fc20c0d64c618d9aa73ced5b4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6b03f323500c71fc20c0d64c618d9aa73ced5b4
Author: Eric Anholt <eric at anholt.net>
Date: Sat Jul 31 15:47:35 2010 -0700
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 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 9b47e47..9d53197 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)
More information about the mesa-commit
mailing list