Mesa (master): radv: fix setting CB_SHADER_MASK for dual source blending

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 10 15:19:58 UTC 2019


Module: Mesa
Branch: master
Commit: e9316fdfd4899c269a19e106a6ffa4309ae48b27
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9316fdfd4899c269a19e106a6ffa4309ae48b27

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Jun  6 14:46:47 2019 +0200

radv: fix setting CB_SHADER_MASK for dual source blending

CB_SHADER_MASK was computed without the second color buffer
format which looks totally wrong to me.

While we are at it, copy a comment from RadeonSI.

Cc: 19.0 19.1 <mesa-stable at lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-By: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/vulkan/radv_pipeline.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 6c0d0994cdb..8bc0d9b53e6 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -541,10 +541,13 @@ radv_pipeline_compute_spi_color_formats(struct radv_pipeline *pipeline,
 		}
 	}
 
-	blend->cb_shader_mask = ac_get_cb_shader_mask(col_format);
-
+	/* The output for dual source blending should have the same format as
+	 * the first output.
+	 */
 	if (blend->mrt0_is_dual_src)
 		col_format |= (col_format & 0xf) << 4;
+
+	blend->cb_shader_mask = ac_get_cb_shader_mask(col_format);
 	blend->spi_shader_col_format = col_format;
 }
 




More information about the mesa-commit mailing list