summaryrefslogtreecommitdiffstats
path: root/src/glsl/main.cpp
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/glsl/main.cpp
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/glsl/main.cpp')
-rw-r--r--src/glsl/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 5c0f6475e0b..b62902278c4 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -165,6 +165,7 @@ compile_shader(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_vec_index_to_swizzle(shader->ir) || progress;
progress = do_vec_index_to_cond_assign(shader->ir) || progress;
progress = do_swizzle_swizzle(shader->ir) || progress;