Module: Mesa Branch: master Commit: 04d8d455b76a104493ab7b257426762351782178 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=04d8d455b76a104493ab7b257426762351782178
Author: Gert Wollny <[email protected]> Date: Fri Feb 26 18:44:13 2021 +0100 r600/sfn: Allow any channel for the helper invocation evaluation Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330> --- src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp index 9597b212052..faeab7f34ad 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp @@ -419,13 +419,16 @@ void FragmentShaderFromNir::emit_shader_start() m_helper_invocation = get_temp_register(); auto dummy = PValue(new GPRValue(m_helper_invocation->sel(), 7)); emit_instruction(new AluInstruction(op1_mov, m_helper_invocation, literal(-1), {alu_write, alu_last_instr})); - GPRVector dst({m_helper_invocation, dummy, dummy, dummy}); + GPRVector dst({dummy, dummy, dummy, dummy}); + std::array<int,4> swz = {7,7,7,7}; + dst.set_reg_i(m_helper_invocation->chan(), m_helper_invocation); + swz[m_helper_invocation->chan()] = 4; auto vtx = new FetchInstruction(dst, m_helper_invocation, R600_BUFFER_INFO_CONST_BUFFER, bim_none); vtx->set_flag(vtx_vpm); vtx->set_flag(vtx_use_tc); - vtx->set_dest_swizzle({4,7,7,7}); + vtx->set_dest_swizzle(swz); emit_instruction(vtx); } } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
