radv: call nir_lower_int64 later
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 27 Jun 2023 18:23:39 +0000 (19:23 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 3 Jul 2023 10:38:27 +0000 (10:38 +0000)
I would rather this be after several of these complicated lowering passes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23926>

src/amd/vulkan/radv_pipeline.c

index 3e54679..1dfe045 100644 (file)
@@ -559,9 +559,6 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_pipeline_layo
 
    NIR_PASS(_, stage->nir, nir_lower_alu_width, opt_vectorize_callback, device);
 
-   /* lower ALU operations */
-   NIR_PASS(_, stage->nir, nir_lower_int64);
-
    nir_move_options sink_opts = nir_move_const_undef | nir_move_copies;
 
    if (!pipeline_key->optimisations_disabled) {
@@ -629,6 +626,8 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_pipeline_layo
       NIR_PASS_V(stage->nir, ac_nir_lower_ps, &options);
    }
 
+   NIR_PASS(_, stage->nir, nir_lower_int64);
+
    NIR_PASS(_, stage->nir, nir_opt_idiv_const, 8);
 
    NIR_PASS(_, stage->nir, nir_lower_idiv,