ir3: Lower alu to scalar if nir_legalize_16bit_sampler_srcs made progress.
Fixes: 003327dd95
("freedreno/ir3: Pass 16-bit sampler coordinates when possible.")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16978>
This commit is contained in:
parent
9fe382ba96
commit
06b33770b6
|
@ -802,7 +802,11 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, nir_shader *s)
|
|||
[nir_tex_src_ddy] = {true, 0, nir_tex_src_coord},
|
||||
|
||||
};
|
||||
NIR_PASS_V(s, nir_legalize_16bit_sampler_srcs, tex_constraints);
|
||||
bool scalarize = false;
|
||||
NIR_PASS(scalarize, s, nir_legalize_16bit_sampler_srcs, tex_constraints);
|
||||
if (scalarize) {
|
||||
OPT(s, nir_lower_alu_to_scalar, NULL, NULL);
|
||||
}
|
||||
}
|
||||
OPT_V(s, nir_opt_constant_folding);
|
||||
OPT_V(s, nir_copy_prop);
|
||||
|
|
Loading…
Reference in New Issue