radeonsi: add 16-bit ALU vectorization
authorMarek Olšák <marek.olsak@amd.com>
Fri, 24 Jul 2020 20:15:51 +0000 (16:15 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 22 Sep 2020 02:44:53 +0000 (02:44 +0000)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6622>

src/gallium/drivers/radeonsi/si_shader_nir.c

index 171c2b3..66fca2b 100644 (file)
@@ -560,6 +560,9 @@ static void si_nir_opts(struct si_screen *sscreen, struct nir_shader *nir, bool
       if (nir->options->max_unroll_iterations) {
          NIR_PASS(progress, nir, nir_opt_loop_unroll, 0);
       }
+
+      if (sscreen->info.has_packed_math_16bit)
+         NIR_PASS(progress, nir, nir_opt_vectorize, NULL, NULL);
    } while (progress);
 }