Mesa (main): broadcom/compiler: don't promote early fragment tests when writing sample mask

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 20 13:30:14 UTC 2022


Module: Mesa
Branch: main
Commit: b90d7b9b38b92114532553db01d72b20cbc43d4d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b90d7b9b38b92114532553db01d72b20cbc43d4d

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Fri May 20 09:44:45 2022 +0200

broadcom/compiler: don't promote early fragment tests when writing sample mask

If the sample mask is being written it means we want to discard some of the
samples generated so we should not be promoting the fragment shader to
do early tests, since that would not take into account the sample mask
written from the shader.

Fixes:
dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_samples_4

Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16626>

---

 src/broadcom/compiler/nir_to_vir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index 1f9c2fa5bf5..a1561d418c5 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -1931,6 +1931,7 @@ emit_frag_end(struct v3d_compile *c)
             !(c->s->info.num_images || c->s->info.num_ssbos) &&
             !c->s->info.fs.uses_discard &&
             !c->fs_key->sample_alpha_to_coverage &&
+            c->output_sample_mask_index == -1 &&
             has_any_tlb_color_write) {
                 c->s->info.fs.early_fragment_tests = true;
         }



More information about the mesa-commit mailing list