panvk: Split var copies and lower local vars early

These two passes are a prerequisite for basically anything that
optimizes on variables.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayern@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38334>
This commit is contained in:
Faith Ekstrand 2025-11-07 23:55:03 -05:00 committed by Marge Bot
parent 586e1ac2b8
commit d6dc0ea5ae

View file

@ -407,6 +407,9 @@ panvk_preprocess_nir(struct vk_physical_device *vk_pdev,
NIR_PASS(_, nir, lower_layer_writes);
#endif
NIR_PASS(_, nir, nir_lower_global_vars_to_local);
NIR_PASS(_, nir, nir_split_var_copies);
NIR_PASS(_, nir, nir_lower_indirect_derefs,
nir_var_shader_in | nir_var_shader_out, UINT32_MAX);