pan/nir: Stop doing manual optimization after resize_varying_io

We call bi_optimize_nir() a few lines later.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40769>
This commit is contained in:
Faith Ekstrand 2026-04-02 10:19:02 -04:00
parent c8f61b6b0e
commit eca0575069

View file

@ -1094,19 +1094,9 @@ bifrost_compile_shader_nir(nir_shader *nir,
* fragment shader of something that isn't written by the vertex shader.
* In that case, we just return zero.
*/
if (pan_arch(inputs->gpu_id) >= 9 && inputs->varying_layout) {
if (pan_arch(inputs->gpu_id) >= 9 && inputs->varying_layout)
NIR_PASS(_, nir, pan_nir_resize_varying_io, inputs->varying_layout);
/* pan_nir_resize_varying_io may generate vector conversions which we
* need to clean up so the back-end doesn't see them.
*/
uint64_t gpu_id = inputs->gpu_id;
NIR_PASS(_, nir, nir_lower_alu_width, bi_vectorize_filter, &gpu_id);
NIR_PASS(_, nir, nir_lower_load_const_to_scalar);
NIR_PASS(_, nir, nir_opt_copy_prop);
NIR_PASS(_, nir, nir_opt_dce);
}
if (nir->info.stage == MESA_SHADER_VERTEX) {
info->vs.idvs = bi_should_idvs(nir, inputs);