pan/bi: Move lower_noperspective*() to postprocess()

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38265>
This commit is contained in:
Faith Ekstrand 2025-11-05 13:53:55 -05:00 committed by Marge Bot
parent 0ccadf7a86
commit 6c5f981ba8
3 changed files with 4 additions and 10 deletions

View file

@ -514,11 +514,6 @@ panfrost_create_shader_state(struct pipe_context *pctx,
NIR_PASS(_, nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
glsl_type_size, nir_lower_io_use_interpolated_input_intrinsics);
if (dev->arch >= 6 && nir->info.stage == MESA_SHADER_VERTEX)
NIR_PASS(_, nir, pan_nir_lower_noperspective_vs);
if (dev->arch >= 6 && nir->info.stage == MESA_SHADER_FRAGMENT)
NIR_PASS(_, nir, pan_nir_lower_noperspective_fs);
pan_shader_postprocess(nir, panfrost_device_gpu_id(dev));
if (nir->info.stage == MESA_SHADER_FRAGMENT)

View file

@ -6000,6 +6000,8 @@ bifrost_postprocess_nir(nir_shader *nir, unsigned gpu_id)
bifrost_lower_texture_nir(nir, gpu_id);
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
NIR_PASS(_, nir, pan_nir_lower_noperspective_fs);
NIR_PASS(_, nir, nir_lower_mediump_io,
nir_var_shader_in | nir_var_shader_out,
~bi_fp32_varying_mask(nir), false);
@ -6009,6 +6011,8 @@ bifrost_postprocess_nir(nir_shader *nir, unsigned gpu_id)
NIR_PASS(_, nir, bifrost_nir_lower_load_output);
} else if (nir->info.stage == MESA_SHADER_VERTEX) {
NIR_PASS(_, nir, pan_nir_lower_noperspective_vs);
if (pan_arch(gpu_id) >= 9) {
NIR_PASS(_, nir, nir_lower_mediump_io, nir_var_shader_out,
VARYING_BIT_PSIZ, false);

View file

@ -922,11 +922,6 @@ panvk_lower_nir(struct panvk_device *dev, nir_shader *nir,
NIR_PASS(_, nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
glsl_type_size, nir_lower_io_use_interpolated_input_intrinsics);
if (nir->info.stage == MESA_SHADER_VERTEX)
NIR_PASS(_, nir, pan_nir_lower_noperspective_vs);
if (nir->info.stage == MESA_SHADER_FRAGMENT)
NIR_PASS(_, nir, pan_nir_lower_noperspective_fs);
pan_shader_postprocess(nir, compile_input->gpu_id);
if (stage == MESA_SHADER_VERTEX)