nir: allow specifying a set of opcodes in lower_alu_to_scalar
This can be used by both etnaviv and freedreno/a2xx as they are both vec4 architectures with some instructions being scalar-only. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -97,7 +97,7 @@ lima_program_optimize_vs_nir(struct nir_shader *s)
|
||||
progress = false;
|
||||
|
||||
NIR_PASS_V(s, nir_lower_vars_to_ssa);
|
||||
NIR_PASS(progress, s, nir_lower_alu_to_scalar);
|
||||
NIR_PASS(progress, s, nir_lower_alu_to_scalar, NULL);
|
||||
NIR_PASS(progress, s, nir_lower_phis_to_scalar);
|
||||
NIR_PASS(progress, s, nir_copy_prop);
|
||||
NIR_PASS(progress, s, nir_opt_remove_phis);
|
||||
@@ -135,7 +135,7 @@ lima_program_optimize_fs_nir(struct nir_shader *s)
|
||||
progress = false;
|
||||
|
||||
NIR_PASS_V(s, nir_lower_vars_to_ssa);
|
||||
//NIR_PASS(progress, s, nir_lower_alu_to_scalar);
|
||||
//NIR_PASS(progress, s, nir_lower_alu_to_scalar, NULL);
|
||||
NIR_PASS(progress, s, nir_lower_phis_to_scalar);
|
||||
NIR_PASS(progress, s, nir_copy_prop);
|
||||
NIR_PASS(progress, s, nir_opt_remove_phis);
|
||||
|
Reference in New Issue
Block a user