aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-26 22:50:29 -0700
committerEric Anholt <[email protected]>2010-07-27 09:43:52 -0700
commit832aad989e3d319a8aaac046aa49df25da134d82 (patch)
treea0646404b655dbaac4ef112074ad985d02b4dea7 /src/mesa
parent5533c6e38030ff6e26375a1a4e4bfa9ab2204d4c (diff)
glsl2: Add optimization pass for algebraic simplifications.
This cleans up the assembly output of almost all the non-logic tests glsl-algebraic-*. glsl-algebraic-pow-two needs love (basically, flattening to a temporary and squaring it).
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index d06b83261c6..2fd0507c2fb 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2240,6 +2240,7 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
progress = do_dead_code_unlinked(state, shader->ir) || progress;
progress = do_constant_variable_unlinked(shader->ir) || progress;
progress = do_constant_folding(shader->ir) || progress;
+ progress = do_algebraic(shader->ir) || progress;
progress = do_if_return(shader->ir) || progress;
if (ctx->Shader.EmitNoIfs)
progress = do_if_to_cond_assign(shader->ir) || progress;