glsl: Add flag to disable part of do_vec_index_to_cond_assign

As of ca63a5ed3e ("glsl: fix interpolateAtXxx(some_vec[idx], ...)  with
dynamic idx"), this lowering pass does two things.  It converts
ir_binop_vector_extract to an if-ladder to select the dynamically
indexed component, and it extracts a ir_binop_vector_extract from the
source of an interpolateAt function and applies to the result instead.

This change adds a flag to disable the former behavior.  The latter is
still useful, but NIR has better (and soon even better) ways of doing
the former.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16440>
This commit is contained in:
Ian Romanick
2022-01-14 13:39:06 -08:00
committed by Marge Bot
parent 4eff1e6481
commit e944a98826
4 changed files with 20 additions and 12 deletions

View File

@@ -116,7 +116,7 @@ bool do_minmax_prune(exec_list *instructions);
bool do_structure_splitting(exec_list *instructions);
bool optimize_swizzles(exec_list *instructions);
bool do_tree_grafting(exec_list *instructions);
bool do_vec_index_to_cond_assign(exec_list *instructions);
bool do_vec_index_to_cond_assign(exec_list *instructions, bool lower_extracts);
bool do_vec_index_to_swizzle(exec_list *instructions);
bool lower_discard(exec_list *instructions);
void lower_discard_flow(exec_list *instructions);