nouveau/mme/fermi: Don't allow STATE and EMIT on the same op

Fixes: 162269f049 ("nouveau/mme: Add Fermi builder")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
This commit is contained in:
Faith Ekstrand 2025-03-17 11:21:00 -05:00 committed by Marge Bot
parent 81986a8523
commit 3354c24169

View file

@ -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 &&