From e9316fdfd4899c269a19e106a6ffa4309ae48b27 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 6 Jun 2019 14:46:47 +0200 Subject: 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 Signed-off-by: Samuel Pitoiset Reviewed-By: Bas Nieuwenhuizen --- 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; } -- cgit v1.2.3