From cf31388a9afd14574cf355e88eea0e7067b77a98 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 9 Oct 2024 16:34:15 -0500 Subject: [PATCH] nouveau/mme: Turing can't have emit and state in the same op Fixes: 6a84d5439d27 ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME") Part-of: --- src/nouveau/mme/mme_tu104_builder.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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));