From 0ee24c46e0aad500a4ef90cc03cfd319e11cb342 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 31 May 2022 08:41:03 -0400 Subject: [PATCH] pan/mdg: Only print 2 sources for ALU ..and assert the other sources are null. The one place this might fail in the future is for real FMA, but we don't support that for GL. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_print.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c index 2a43516dd3c..cac792ae8ac 100644 --- a/src/panfrost/midgard/midgard_print.c +++ b/src/panfrost/midgard/midgard_print.c @@ -278,9 +278,15 @@ mir_print_instruction(midgard_instruction *ins) else mir_print_src(ins, 1); - for (unsigned c = 2; c <= 3; ++c) { - printf(", "); - mir_print_src(ins, c); + if (is_alu) { + /* ALU ops are all 2-src */ + assert(ins->src[2] == ~0); + assert(ins->src[3] == ~0); + } else { + for (unsigned c = 2; c <= 3; ++c) { + printf(", "); + mir_print_src(ins, c); + } } if (ins->no_spill)