diff options
author | Eric Anholt <[email protected]> | 2011-01-25 10:28:13 +1000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-02-04 12:18:38 -0600 |
commit | e31266ed3e3667c043bc5ad1abd65cfdb0fa7fdb (patch) | |
tree | a9ddee7289bb07b33c2749a555f8df57055294cb /src/glsl/glsl_parser_extras.cpp | |
parent | cde443e0b94ec6d8d0a99284e72ca7f9e2591174 (diff) |
glsl: Add a new opt_copy_propagation variant that does it channel-wise.
This patch cleans up many of the extra copies in GLSL IR introduced by
i965's scalarizing passes. It doesn't result in a statistically
significant performance difference on nexuiz high settings (n=3) or my
demo (n=10), due to brw_fs.cpp's register coalescing covering most of
those extra moves anyway. However, it does make the debug of wine's
GLSL shaders much more tractable, and reduces instruction count of
glsl-fs-convolution-2 from 376 to 288.
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 1fa209c03c1..c2bb59b9cac 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -764,6 +764,7 @@ do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iteration progress = do_if_simplification(ir) || progress; progress = do_discard_simplification(ir) || progress; progress = do_copy_propagation(ir) || progress; + progress = do_copy_propagation_elements(ir) || progress; if (linked) progress = do_dead_code(ir) || progress; else |