summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-08-09 17:03:46 -0700
committerEric Anholt <eric@anholt.net>2010-08-09 19:21:18 -0700
commit8bebbeb7c5b26ec9166a4644a2c051238d18509b (patch)
treef2f663f93e10674b2e39f3c1a44a0e8a57060b1b /src/mesa
parent81996ae8618759cf7fdd033042a96f3014659f6c (diff)
glsl2: Add constant propagation.
Whereas constant folding evaluates constant expressions at rvalue nodes, constant propagation tracks constant components of vectors across execution to replace (possibly swizzled) variable dereferences with constant values, triggering possible constant folding or reduced variable liveness.
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 c6856eb5a4..5a272ab88a 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2581,6 +2581,7 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
progress = do_dead_code_local(shader->ir) || progress;
progress = do_dead_code_unlinked(shader->ir) || progress;
progress = do_tree_grafting(shader->ir) || progress;
+ progress = do_constant_propagation(shader->ir) || progress;
progress = do_constant_variable_unlinked(shader->ir) || progress;
progress = do_constant_folding(shader->ir) || progress;
progress = do_algebraic(shader->ir) || progress;