nir/lower_blend: Enable per-sample shading
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 9 Apr 2023 14:21:32 +0000 (10:21 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 11 Apr 2023 04:16:32 +0000 (04:16 +0000)
Loading output require per-sample blending, so enable per-sample execution of
the shader as a whole so the right sample values are blended. Affects:

dEQP-GLES31.functional.multisample.default_framebuffer.sample_mask_sum_of_inverses

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22385>

src/compiler/nir/nir_lower_blend.c

index f61a221..bfbf985 100644 (file)
@@ -533,6 +533,7 @@ nir_lower_blend_instr(nir_builder *b, nir_instr *instr, void *data)
 
       b->shader->info.outputs_read |= BITFIELD64_BIT(sem.location);
       b->shader->info.fs.uses_fbfetch_output = true;
+      b->shader->info.fs.uses_sample_shading = true;
       sem.fb_fetch_output = true;
 
       dst = nir_load_output(b, 4, nir_src_bit_size(store->src[0]),