summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_optimization.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-03-18 14:45:53 -0700
committerIan Romanick <[email protected]>2013-05-13 12:05:19 -0700
commitee7a6dad302ff5568566e325df56fd582be1afec (patch)
tree44d9126f87138c4083a118f63e556561ef7bcf04 /src/glsl/ir_optimization.h
parentb881ddba7d4a835f879ffe300661a72441448eee (diff)
glsl: Add lowering pass for ir_triop_vector_insert
This will eventually replace do_vec_index_to_cond_assign. This lowering pass is called in all the places where do_vec_index_to_cond_assign or do_vec_index_to_swizzle is called. v2: Use WRITEMASK_* instead of integer literals. Use a more concise method of generating broadcast_index. Both suggested by Eric. v3: Use a series of scalar compares instead of a single vector compare. Suggested by Eric and Ken. It still uses 'if (cond) v.x = y;' instead of conditional assignments because ir_builder doesn't do conditional assignments, and I'd rather keep the code simple. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
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 28093cfe1a1..1c3bc60088f 100644
--- a/src/glsl/ir_optimization.h
+++ b/src/glsl/ir_optimization.h
@@ -109,6 +109,7 @@ void lower_ubo_reference(struct gl_shader *shader, exec_list *instructions);
void lower_packed_varyings(void *mem_ctx, unsigned location_base,
unsigned locations_used, ir_variable_mode mode,
gl_shader *shader);
+bool lower_vector_insert(exec_list *instructions, bool lower_nonconstant_index);
bool optimize_redundant_jumps(exec_list *instructions);
bool optimize_split_arrays(exec_list *instructions, bool linked);