r600/sfn: force dual source blend output handling in some cases

If an output has a dual source index > 0 then we need to emit both
outputs, even if the number of outputs is larger than the number
of active outputs.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>
This commit is contained in:
Gert Wollny 2021-03-22 08:18:52 +01:00 committed by Marge Bot
parent 40fdf1be46
commit 6bcc2defa9

View file

@ -449,6 +449,12 @@ bool FragmentShaderFromNir::process_store_output(nir_intrinsic_instr *instr)
semantic.location <= FRAG_RESULT_DATA7)) {
++m_max_counted_color_exports;
/* Hack: force dual source output handling if one color output has a
* dual_source_blend_index > 0 */
if (semantic.location == FRAG_RESULT_COLOR &&
semantic.dual_source_blend_index > 0)
m_dual_source_blend = true;
if (m_max_counted_color_exports > 1)
sh_info().fs_write_all = false;
return true;