From c89a3ad8573f67fef5ef7fba3b1cc9a7fb8bb30a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 17 Jun 2022 21:15:49 -0400 Subject: [PATCH] panfrost: Fix shader_modifies_coverage on Valhall Alpha-to-coverage should set this flag. This is a hardware change since Bifrost. Fixes: 26d339ef8ac ("panfrost: Generate Valhall Malloc IDVS jobs") Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index a3f3e85ed3a..258e6f7c3c3 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -3345,8 +3345,12 @@ panfrost_emit_draw(void *out, */ cfg.evaluate_per_sample |= fs->info.fs.sample_shading; + /* Unlike Bifrost, alpha-to-coverage must be included in + * this identically-named flag. Confusing, isn't it? + */ cfg.shader_modifies_coverage = fs->info.fs.writes_coverage || - fs->info.fs.can_discard; + fs->info.fs.can_discard || + ctx->blend->base.alpha_to_coverage; /* Blend descriptors are only accessed by a BLEND * instruction on Valhall. It follows that if the