From 3354c24169bf2b5616108e1f466148a1e046eef6 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 17 Mar 2025 11:21:00 -0500 Subject: [PATCH] nouveau/mme/fermi: Don't allow STATE and EMIT on the same op Fixes: 162269f04981 ("nouveau/mme: Add Fermi builder") Part-of: --- src/nouveau/mme/mme_fermi_builder.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/nouveau/mme/mme_fermi_builder.c b/src/nouveau/mme/mme_fermi_builder.c index 6bf9395f840..75df0ca4221 100644 --- a/src/nouveau/mme/mme_fermi_builder.c +++ b/src/nouveau/mme/mme_fermi_builder.c @@ -166,7 +166,13 @@ mme_fermi_prev_inst_can_emit(struct mme_fermi_builder *b, struct mme_value data) return false; } - if ((b->inst_parts & MME_FERMI_INSTR_PART_ASSIGN) == MME_FERMI_INSTR_PART_ASSIGN) { + if (b->inst_parts & MME_FERMI_INSTR_PART_OP) { + struct mme_fermi_inst *inst = mme_fermi_cur_inst(b); + if (inst->op == MME_FERMI_OP_STATE) + return false; + } + + if (b->inst_parts & MME_FERMI_INSTR_PART_ASSIGN) { struct mme_fermi_inst *inst = mme_fermi_cur_inst(b); if (inst->assign_op == MME_FERMI_ASSIGN_OP_MOVE && data.type == MME_VALUE_TYPE_REG &&