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 <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>
This commit is contained in:
Rob Clark
2021-10-09 11:16:29 -07:00
committed by Marge Bot
parent b6e11225a2
commit 9a2562a545
+3
View File
@@ -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) {