From 6bcc2defa91bf8aaaeaee251ef47c2fd6feb1c39 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 22 Mar 2021 08:18:52 +0100 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp index d258c41acc9..669cd25d1ea 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp @@ -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;