Commit d838cb96 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

pan/mdg: Defer nir_fuse_io_16 until after opts

Sometimes DCE/etc can opt out things that would force 32-bit, so this is
worthwhile.
Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <!5513>
parent 78df3b03
...@@ -473,9 +473,6 @@ optimise_nir(nir_shader *nir, unsigned quirks, bool is_blend) ...@@ -473,9 +473,6 @@ optimise_nir(nir_shader *nir, unsigned quirks, bool is_blend)
NIR_PASS(progress, nir, midgard_nir_lower_algebraic_early); NIR_PASS(progress, nir, midgard_nir_lower_algebraic_early);
if (!is_blend)
NIR_PASS(progress, nir, nir_fuse_io_16);
do { do {
progress = false; progress = false;
...@@ -522,6 +519,10 @@ optimise_nir(nir_shader *nir, unsigned quirks, bool is_blend) ...@@ -522,6 +519,10 @@ optimise_nir(nir_shader *nir, unsigned quirks, bool is_blend)
NIR_PASS(progress, nir, nir_opt_vectorize); NIR_PASS(progress, nir, nir_opt_vectorize);
} while (progress); } while (progress);
/* Run after opts so it can hit more */
if (!is_blend)
NIR_PASS(progress, nir, nir_fuse_io_16);
/* Must be run at the end to prevent creation of fsin/fcos ops */ /* Must be run at the end to prevent creation of fsin/fcos ops */
NIR_PASS(progress, nir, midgard_nir_scale_trig); NIR_PASS(progress, nir, midgard_nir_scale_trig);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment