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 <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16798>
This commit is contained in:
Alyssa Rosenzweig
2022-05-31 08:41:03 -04:00
parent 9c9db27e3c
commit 0ee24c46e0

View File

@@ -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)