nir: Add an option to not lower source mods for f64/u64/i64.

TGSI can't handle them, but we want to use this pass for nir-to-tgsi.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3395>
This commit is contained in:
Eric Anholt
2020-07-24 15:13:40 -07:00
parent c730feacc0
commit d867e7c974
3 changed files with 16 additions and 3 deletions

View File

@@ -844,7 +844,9 @@ int r600_shader_from_nir(struct r600_context *rctx,
//NIR_PASS_V(sel->nir, nir_opt_algebraic);
//NIR_PASS_V(sel->nir, nir_copy_prop);
NIR_PASS_V(sh, nir_lower_to_source_mods, nir_lower_float_source_mods);
NIR_PASS_V(sh, nir_lower_to_source_mods,
(nir_lower_to_source_mods_flags)(nir_lower_float_source_mods |
nir_lower_64bit_source_mods));
NIR_PASS_V(sh, nir_convert_from_ssa, true);
NIR_PASS_V(sh, nir_opt_dce);