Mesa (staging/19.1): radv: fix setting CB_SHADER_MASK for dual source blending
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 11 08:27:56 UTC 2019
Module: Mesa
Branch: staging/19.1
Commit: d058124201bf2de38f629c24770de16762d8c914
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d058124201bf2de38f629c24770de16762d8c914
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>
(cherry picked from commit e9316fdfd4899c269a19e106a6ffa4309ae48b27)
---
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 773ccd8707a..13894e653d2 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -542,10 +542,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