summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2019-06-06 14:46:47 +0200
committerDylan Baker <dylan@pnwbakers.com>2019-06-20 10:32:25 -0700
commitc7ff7af2621aea9e7f668c8c5d991608ce883502 (patch)
tree00b69d36e534cebf1ba9156f89ea5a173b4fe63f
parent8066847b8ef39169e59890691a38efdd9c60a7ed (diff)
downloadmesa-c7ff7af2621aea9e7f668c8c5d991608ce883502.tar.gz
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@lists.freedesktop.org> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-By: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit e9316fdfd4899c269a19e106a6ffa4309ae48b27)
-rw-r--r--src/amd/vulkan/radv_pipeline.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 8abe63f6f6a..02d706fca8b 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;
}