nir: Allow to skip integer ops in nir_lower_to_source_mods

Some hardware supports source mods only for float operations. Make it
possible to skip lowering to source mods in these cases.

v2: use option flags instead of a boolean (Jason Ekstrand)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Gert Wollny
2018-11-12 09:17:34 +01:00
committed by Gert Wollny
parent b4380cb070
commit 4bba280937
3 changed files with 58 additions and 32 deletions

View File

@@ -796,7 +796,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
OPT(nir_opt_algebraic_late);
OPT(nir_lower_to_source_mods);
OPT(nir_lower_to_source_mods, nir_lower_all_source_mods);
OPT(nir_copy_prop);
OPT(nir_opt_dce);
OPT(nir_opt_move_comparisons);