r600/sfn: Fix printing ALU op without dest
authorGert Wollny <gert.wollny@collabora.com>
Mon, 18 May 2020 18:34:06 +0000 (20:34 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 07:52:14 +0000 (07:52 +0000)
e.g. GROUP_BARRIER doesn't have a dest.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085>

src/gallium/drivers/r600/sfn/sfn_instruction_alu.cpp

index c059749afd0e220d2ee5f9b9f9eba94751630508..9569c31a668140933fab2e02ffafe0d681b5ebb0 100644 (file)
@@ -156,7 +156,8 @@ void AluInstruction::do_print(std::ostream& os) const
    os << "ALU " << alu_ops.at(m_opcode).name;
    if (m_flags.test(alu_dst_clamp))
       os << "_CLAMP";
-   os << ' ' << *m_dest << " : "  ;
+   if (m_dest)
+      os << ' ' << *m_dest << " : "  ;
 
    for (unsigned i = 0; i < m_src.size(); ++i) {
       int pflags = 0;