diff --git a/.pick_status.json b/.pick_status.json index 473f2ee96b6..9197b3cd85d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -344,7 +344,7 @@ "description": "asahi: fix a2c with sample shading, harder", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "9bbe93d158915f5b4b0904c12e52d393dc30f4ae", "notes": null diff --git a/src/asahi/lib/agx_nir_prolog_epilog.c b/src/asahi/lib/agx_nir_prolog_epilog.c index 99a4bcb6a01..fcd3e442cfe 100644 --- a/src/asahi/lib/agx_nir_prolog_epilog.c +++ b/src/asahi/lib/agx_nir_prolog_epilog.c @@ -448,16 +448,17 @@ agx_nir_fs_epilog(nir_builder *b, const void *key_) * to the epilog, when sample shading is not used but blending is. */ if (key->link.sample_shading) { - NIR_PASS(_, b->shader, agx_nir_lower_to_per_sample); - NIR_PASS(_, b->shader, agx_nir_lower_fs_active_samples_to_register); - /* Lower the resulting discards. Done in agx_nir_lower_monolithic_msaa for - * the pixel shaded path. + * the pixel shaded path. Must be done before agx_nir_lower_to_per_sample + * to avoid duplicating tests. */ if (key->blend.alpha_to_coverage) { NIR_PASS(_, b->shader, agx_nir_lower_sample_mask); } + NIR_PASS(_, b->shader, agx_nir_lower_to_per_sample); + NIR_PASS(_, b->shader, agx_nir_lower_fs_active_samples_to_register); + /* Ensure the sample ID is preserved in register. We do this late since it * has to go in the last block, and the above passes might add control * flow when lowering.