diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2019-06-06 16:31:01 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-06-20 10:31:52 -0700 |
commit | a4f5616c60f02a8f05295abc5702b056063a96c8 (patch) | |
tree | 2458fe2ce99b46f0fa007ddb8e5e3d9fb35371f7 | |
parent | 7768f52c04cc3c6fb5cd220ab04a00d449e939aa (diff) | |
download | mesa-a4f5616c60f02a8f05295abc5702b056063a96c8.tar.gz |
radv: fix alpha-to-coverage when there is unused color attachments
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@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl
(cherry picked from commit 91aa25f4625014ddf194578fc1c1d0a505e5f8db)
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 2526000f56f..8abe63f6f6a 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -524,7 +524,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. |