pan/mdg: Print 3 sources for CSEL

The third source exists logically but not architecturally. We still need to
print it. Caught by the assertion.

Fixes: 0ee24c46e0 ("pan/mdg: Only print 2 sources for ALU")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18338>
This commit is contained in:
Alyssa Rosenzweig 2022-08-22 13:38:16 -04:00 committed by Marge Bot
parent 4fe755e803
commit 6fed616187

View file

@ -293,8 +293,22 @@ mir_print_instruction(midgard_instruction *ins)
mir_print_src(ins, 1);
if (is_alu) {
/* ALU ops are all 2-src */
assert(ins->src[2] == ~0);
/* ALU ops are all 2-src, though CSEL is treated like a 3-src
* pseudo op with the third source scheduler lowered
*/
switch (ins->op) {
case midgard_alu_op_icsel:
case midgard_alu_op_fcsel:
case midgard_alu_op_icsel_v:
case midgard_alu_op_fcsel_v:
printf(", ");
mir_print_src(ins, 2);
break;
default:
assert(ins->src[2] == ~0);
break;
}
assert(ins->src[3] == ~0);
} else {
for (unsigned c = 2; c <= 3; ++c) {