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@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16626>
!(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;
}