zink: run more int64 passes during optimization loop if int64 isn't available
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 19 May 2022 19:38:26 +0000 (15:38 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 10 Jun 2022 02:35:12 +0000 (02:35 +0000)
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16669>

src/gallium/drivers/zink/zink_compiler.c

index dc02348..9ebbf12 100644 (file)
@@ -470,11 +470,14 @@ optimize_nir(struct nir_shader *s)
    bool progress;
    do {
       progress = false;
+      if (s->options->lower_int64_options)
+         NIR_PASS_V(s, nir_lower_int64);
       NIR_PASS_V(s, nir_lower_vars_to_ssa);
       NIR_PASS(progress, s, nir_lower_alu_to_scalar, filter_pack_instr, NULL);
       NIR_PASS(progress, s, nir_copy_prop);
       NIR_PASS(progress, s, nir_opt_remove_phis);
       if (s->options->lower_int64_options) {
+         NIR_PASS(progress, s, nir_lower_64bit_phis);
          NIR_PASS(progress, s, nir_lower_alu_to_scalar, filter_64_bit_instr, NULL);
       }
       NIR_PASS(progress, s, nir_opt_dce);