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 <ian.d.romanick@intel.com>
This commit is contained in:
Matt Turner
2013-12-21 11:28:05 -08:00
parent 5e82d8a9da
commit 4bd6e0d7c6
4 changed files with 325 additions and 0 deletions

View File

@@ -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