From a75f2681d26aecad185895c1c2f13dd542281ff9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 11 Jul 2012 08:26:31 -0700 Subject: glsl: Add a lowering pass to turn complicated UBO references to vector loads. v2: Reduce the impenetrable code in emit_ubo_loads() by 23 lines by keeping the ir_variable as the variable part of the offset from handle_rvalue(), and track the constant offsets from that with a plain old integer value, avoiding a bunch of temporary variables in the array and struct handling. Also, fix file description doxygen. v3: Fix a row vs col typo, and fix spelling in a comment. Reviewed-by: Eric Anholt --- src/glsl/ir_optimization.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/glsl/ir_optimization.h') diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index c435d771726..2220d511e96 100644 --- a/src/glsl/ir_optimization.h +++ b/src/glsl/ir_optimization.h @@ -74,6 +74,7 @@ bool lower_variable_index_to_cond_assign(exec_list *instructions, 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); +void lower_ubo_reference(struct gl_shader *shader, exec_list *instructions); bool optimize_redundant_jumps(exec_list *instructions); bool optimize_split_arrays(exec_list *instructions, bool linked); -- cgit v1.2.3