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>
}
}
- 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;
}