diff --git a/src/nouveau/mme/mme_tu104_builder.c b/src/nouveau/mme/mme_tu104_builder.c index 275451ee660..e4e6d05197a 100644 --- a/src/nouveau/mme/mme_tu104_builder.c +++ b/src/nouveau/mme/mme_tu104_builder.c @@ -540,6 +540,14 @@ mme_tu104_next_inst_can_add_emit(struct mme_tu104_builder *tb, return false; } + /* We can't have an emit in an op with STATE */ + struct mme_tu104_inst *cur = mme_tu104_cur_inst(tb); + if (((tb->inst_parts & MME_TU104_INSTR_PART_ALU0) && + cur->alu[0].op == MME_TU104_ALU_OP_STATE) || + ((tb->inst_parts & MME_TU104_INSTR_PART_ALU1) && + cur->alu[1].op == MME_TU104_ALU_OP_STATE)) + return false; + const unsigned used_imms = util_bitcount(tb->inst_parts & (MME_TU104_INSTR_PART_IMM0 | MME_TU104_INSTR_PART_IMM1));