diff --git a/.pick_status.json b/.pick_status.json index 2c2bfb80074..aee75511ef8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -584,7 +584,7 @@ "description": "pan/bi: Stop writing pan_shader_info::vs::idvs on non VS stages", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1d21de788d3f4f7fbdcf5b57884bc149a2e219e3", "notes": null diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index c120d80e814..c6c03ecf966 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -6296,10 +6296,12 @@ bifrost_compile_shader_nir(nir_shader *nir, */ NIR_PASS(_, nir, pan_nir_lower_zs_store); - info->vs.idvs = bi_should_idvs(nir, inputs); + if (nir->info.stage == MESA_SHADER_VERTEX) { + info->vs.idvs = bi_should_idvs(nir, inputs); - if (info->vs.idvs) - NIR_PASS(_, nir, bifrost_nir_lower_shader_output); + if (info->vs.idvs) + NIR_PASS(_, nir, bifrost_nir_lower_shader_output); + } bi_optimize_nir(nir, inputs->gpu_id, inputs->is_blend); @@ -6307,12 +6309,14 @@ bifrost_compile_shader_nir(nir_shader *nir, pan_nir_collect_varyings(nir, info, PAN_MEDIUMP_VARY_32BIT); - /* On Avalon, IDVS is only in one binary */ - if (info->vs.idvs && pan_arch(inputs->gpu_id) >= 12) { - bi_compile_variant(nir, inputs, binary, info, BI_IDVS_ALL); - } else if (info->vs.idvs) { - bi_compile_variant(nir, inputs, binary, info, BI_IDVS_POSITION); - bi_compile_variant(nir, inputs, binary, info, BI_IDVS_VARYING); + if (nir->info.stage == MESA_SHADER_VERTEX && info->vs.idvs) { + /* On Avalon, IDVS is only in one binary */ + if (pan_arch(inputs->gpu_id) >= 12) + bi_compile_variant(nir, inputs, binary, info, BI_IDVS_ALL); + else { + bi_compile_variant(nir, inputs, binary, info, BI_IDVS_POSITION); + bi_compile_variant(nir, inputs, binary, info, BI_IDVS_VARYING); + } } else { bi_compile_variant(nir, inputs, binary, info, BI_IDVS_NONE); }