panfrost: Lower indirect derefs before lower_io

This will surely lose performance in some cases, this is a temporary fix
to align ourselves with how the Vulkan compiler works.  We might be able
to us indirect varyings directly in the future depending on how we
handle their memory layout.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40391>
This commit is contained in:
Lorenzo Rossi 2026-03-17 08:52:37 +01:00 committed by Marge Bot
parent 538c3ee6c7
commit 636aba5811

View file

@ -536,6 +536,8 @@ panfrost_create_shader_state(struct pipe_context *pctx,
pan_preprocess_nir(nir, panfrost_device_gpu_id(dev));
pan_nir_lower_texture_early(nir, panfrost_device_gpu_id(dev));
NIR_PASS(_, nir, nir_lower_indirect_derefs_to_if_else_trees,
nir_var_shader_in | nir_var_shader_out, UINT32_MAX);
NIR_PASS(_, nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
glsl_type_size, nir_lower_io_use_interpolated_input_intrinsics);