summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-12-21 11:28:05 -0800
committerMatt Turner <[email protected]>2014-01-21 14:20:44 -0800
commit4bd6e0d7c69b304be88996a6c2b96ce7d996e627 (patch)
tree6ed796744e87637628cba67217f31da8f78fea68 /src/glsl/glsl_parser_extras.cpp
parent5e82d8a9da9eeab33e2819c2d90f1419e42cb33d (diff)
glsl: Vectorize multiple scalar assignments
Reduces vertex shader instruction counts in DOTA2 by 6.42%, L4D2 by 4.61%, and CS:GO by 5.71%. total instructions in shared programs: 1500153 -> 1498191 (-0.13%) instructions in affected programs: 59919 -> 57957 (-3.27%) Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 35d5679b58b..9a1e0a249ed 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1564,6 +1564,10 @@ do_common_optimization(exec_list *ir, bool linked,
if (options->OptimizeForAOS && !linked)
progress = opt_flip_matrices(ir) || progress;
+ if (linked && options->OptimizeForAOS) {
+ progress = do_vectorize(ir) || progress;
+ }
+
if (linked)
progress = do_dead_code(ir, uniform_locations_assigned) || progress;
else