aco: add ACO_DEBUG=novn,noopt,nosched for debugging purposes
[mesa.git] / src / amd / compiler / aco_ir.cpp
index 801fbc68616be47af44a9f83abb9e6c358e7454c..c24356079f8f112dab51542f02a3ad91cc584a52 100644 (file)
@@ -35,6 +35,9 @@ static const struct debug_control aco_debug_options[] = {
    {"validatera", DEBUG_VALIDATE_RA},
    {"perfwarn", DEBUG_PERFWARN},
    {"force-waitcnt", DEBUG_FORCE_WAITCNT},
+   {"novn", DEBUG_NO_VN},
+   {"noopt", DEBUG_NO_OPT},
+   {"nosched", DEBUG_NO_SCHED},
    {NULL, 0}
 };
 
@@ -238,6 +241,10 @@ aco_ptr<Instruction> convert_to_SDWA(chip_class chip, aco_ptr<Instruction>& inst
    }
 
    for (unsigned i = 0; i < instr->operands.size(); i++) {
+      /* SDWA only uses operands 0 and 1. */
+      if (i >= 2)
+         break;
+
       switch (instr->operands[i].bytes()) {
       case 1:
          sdwa->sel[i] = sdwa_ubyte;