The sample mask must be applied when more then one sample is available or
multisamplig is not enabled, so add a shader key to track this.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5963>
unsigned image_size_const_offset:5;
unsigned color_two_side:1;
unsigned alpha_to_one:1;
+ unsigned apply_sample_id_mask:1;
} ps;
struct {
unsigned prim_id_out:8;
rctx->rasterizer && rctx->rasterizer->multisample_enable &&
!rctx->framebuffer.cb0_is_integer;
key->ps.nr_cbufs = rctx->framebuffer.state.nr_cbufs;
+ key->ps.apply_sample_id_mask = (rctx->ps_iter_samples > 1) || !rctx->rasterizer->multisample_enable;
/* Dual-source blending only makes sense with nr_cbufs == 1. */
if (key->ps.nr_cbufs == 1 && rctx->dual_src_blend)
key->ps.nr_cbufs = 2;