i965: Handle BRW_OPCODE_DO on Gen6+ in brw_instruction_name().
authorMatt Turner <mattst88@gmail.com>
Mon, 9 May 2016 22:58:20 +0000 (15:58 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 10 May 2016 19:12:46 +0000 (12:12 -0700)
This became a problem after the recent disassembler changes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_shader.cpp

index 0e33953f8cfe0b8093b44d5b7949f265a6ef9884..a23f14e85987f05117fbc742cfc8391d2adeafdd 100644 (file)
@@ -168,6 +168,12 @@ brw_instruction_name(const struct brw_device_info *devinfo, enum opcode op)
 {
    switch (op) {
    case BRW_OPCODE_ILLEGAL ... BRW_OPCODE_NOP:
+      /* The DO instruction doesn't exist on Gen6+, but we use it to mark the
+       * start of a loop in the IR.
+       */
+      if (devinfo->gen >= 6 && op == BRW_OPCODE_DO)
+         return "do";
+
       assert(brw_opcode_desc(devinfo, op)->name);
       return brw_opcode_desc(devinfo, op)->name;
    case FS_OPCODE_FB_WRITE: