radv: Only call nir_opt_memcpy once

No fossil stats differences.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
This commit is contained in:
Daniel Schürmann
2025-11-10 11:39:24 +01:00
committed by Marge Bot
parent 7ee1932309
commit c3b72ea00c
+4 -2
View File
@@ -179,7 +179,6 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively)
NIR_LOOP_PASS(progress, skip, shader, nir_opt_find_array_copies);
}
NIR_LOOP_PASS(progress, skip, shader, nir_opt_memcpy);
NIR_LOOP_PASS(progress, skip, shader, nir_opt_copy_prop_vars);
NIR_LOOP_PASS(progress, skip, shader, nir_opt_dead_write_vars);
NIR_LOOP_PASS(_, skip, shader, nir_lower_vars_to_ssa);
@@ -725,9 +724,12 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st
};
NIR_PASS(_, nir, nir_opt_access, &opt_access_options);
if (!stage->key.optimisations_disabled)
if (!stage->key.optimisations_disabled) {
radv_optimize_nir(nir, false);
NIR_PASS(_, nir, nir_opt_memcpy);
}
/* We call nir_lower_var_copies() after the first radv_optimize_nir()
* to remove any copies introduced by nir_opt_find_array_copies().
*/