[Mesa-dev] [PATCH] radv: fix alpha-to-coverage when there is unused color attachments

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Jun 7 18:17:37 UTC 2019


r-b

On Thu, Jun 6, 2019 at 4:27 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> When alphaToCoverage is enabled, we should always write the alpha
> channel of MRT0 if it's unused. This now matches RadeonSI.
>
> This fixes the new CTS:
> dEQP-VK.pipeline.multisample.alpha_to_coverage_unused_attachment.samples_*.alpha_invisible
>
> Cc: 19.0 19.1 <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_pipeline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
> index d38c56b337e..8bc0d9b53e6 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -523,7 +523,7 @@ radv_pipeline_compute_spi_color_formats(struct radv_pipeline *pipeline,
>                 col_format |= cf << (4 * i);
>         }
>
> -       if (!col_format && blend->need_src_alpha & (1 << 0)) {
> +       if (!(col_format & 0xf) && blend->need_src_alpha & (1 << 0)) {
>                 /* When a subpass doesn't have any color attachments, write the
>                  * alpha channel of MRT0 when alpha coverage is enabled because
>                  * the depth attachment needs it.
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list