From 9a2562a545ba694b33afdf06ff3f5f2867dc26da Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 9 Oct 2021 11:16:29 -0700 Subject: [PATCH] freedreno/ir3: Deal with zero-source instructions Needed by the next patch, which starts treating bools as 16bit exposing a bug that was previously accidentially hidden for instructions like ELECT_MACRO. Needed for next patch. Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index d266805b757..634732a6acb 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -706,6 +706,9 @@ ir3_set_dst_type(struct ir3_instruction *instr, bool half) void ir3_fixup_src_type(struct ir3_instruction *instr) { + if (instr->srcs_count == 0) + return; + switch (opc_cat(instr->opc)) { case 1: /* move instructions */ if (instr->srcs[0]->flags & IR3_REG_HALF) {