summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_optimization.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-10-02 22:57:17 -0700
committerEric Anholt <eric@anholt.net>2012-04-11 18:08:21 -0700
commit60177d5e2aec07ed6386a6935b118a356d58c4ec (patch)
treea013f97449bccc118aaa9ee42abc01fc22e11e6a /src/glsl/ir_optimization.h
parentfda662f4dffa658d28ea739dd236fe0350828d59 (diff)
downloadexternal_mesa3d-60177d5e2aec07ed6386a6935b118a356d58c4ec.zip
external_mesa3d-60177d5e2aec07ed6386a6935b118a356d58c4ec.tar.gz
external_mesa3d-60177d5e2aec07ed6386a6935b118a356d58c4ec.tar.bz2
glsl: Add an array splitting pass.
I've had this code laying around almost done for a long time. The idea is like opt_structure_splitting, that we've got a bunch of transforms at the GLSL IR level that only understand scalars and vectors, which just skip complicated dereferences. While driver backends may manage some optimization after they split matrices up themselves, it would be better to bring all of our optimization to bear on the problem. While I wasn't expecting changes quite yet, a few programs end up winning: a gstreamer convolution shader, and the Humus dynamic branching demo: Total instructions: 269430 -> 269342 3/2148 programs affected (0.1%) 1498 -> 1410 instructions in affected programs (5.9% reduction)
Diffstat (limited to 'src/glsl/ir_optimization.h')
-rw-r--r--src/glsl/ir_optimization.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h
index 085b969..3567835 100644
--- a/src/glsl/ir_optimization.h
+++ b/src/glsl/ir_optimization.h
@@ -74,6 +74,7 @@ bool lower_quadop_vector(exec_list *instructions, bool dont_lower_swz);
bool lower_clip_distance(exec_list *instructions);
void lower_output_reads(exec_list *instructions);
bool optimize_redundant_jumps(exec_list *instructions);
+bool optimize_split_arrays(exec_list *instructions, bool linked);
ir_rvalue *
compare_index_block(exec_list *instructions, ir_variable *index,