summaryrefslogtreecommitdiff
path: root/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-12 12:10:41 -0700
committerEric Anholt <eric@anholt.net>2010-06-01 15:15:04 -0700
commit65122e9e8038488e8c586eb609e434a90188de27 (patch)
treea0ec2cf6a753017b69961ef18caa9c9f8948fb1c /glsl_parser_extras.cpp
parentf389862006dde5b0d4bcf36ba85364a1ef6d4a5d (diff)
ir_constant_variable: New pass to mark constant-assigned variables constant.
This removes a bunch of gratuitous moving around of constant values from constructors. Makes a shader ir I was looking at for structure handling almost readable.
Diffstat (limited to 'glsl_parser_extras.cpp')
-rw-r--r--glsl_parser_extras.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp
index 316ac236ce..afce9d9c34 100644
--- a/glsl_parser_extras.cpp
+++ b/glsl_parser_extras.cpp
@@ -758,6 +758,7 @@ main(int argc, char **argv)
progress = do_copy_propagation(&instructions) || progress;
progress = do_dead_code_local(&instructions) || progress;
progress = do_dead_code_unlinked(&instructions) || progress;
+ progress = do_constant_variable_unlinked(&instructions) || progress;
progress = do_constant_folding(&instructions) || progress;
progress = do_vec_index_to_swizzle(&instructions) || progress;
progress = do_swizzle_swizzle(&instructions) || progress;