i965/disasm: Fix horizontal stride of dest registers
authorChad Versace <chad.versace@linux.intel.com>
Wed, 23 Jan 2013 19:17:51 +0000 (11:17 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Fri, 25 Jan 2013 05:10:46 +0000 (21:10 -0800)
The bug: The printed horizontal stride was the numerical value of the
  BRW_HORIZONTAL_$N enum.
The fix: Translate the enum before printing.

Note: This is a candidate for the stable releases.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_disasm.c

index 6dd1736ffad492324ebdcd5912812c758a366075..1621769b9dd4795ada517f76193e7fafae570ef9 100644 (file)
@@ -524,7 +524,9 @@ static int dest (FILE *file, struct brw_instruction *inst)
            if (inst->bits1.da1.dest_subreg_nr)
                format (file, ".%d", inst->bits1.da1.dest_subreg_nr /
                                     reg_type_size[inst->bits1.da1.dest_reg_type]);
-           format (file, "<%d>", inst->bits1.da1.dest_horiz_stride);
+           string (file, "<");
+           err |= control (file, "horiz stride", horiz_stride, inst->bits1.da1.dest_horiz_stride, NULL);
+           string (file, ">");
            err |= control (file, "dest reg encoding", reg_encoding, inst->bits1.da1.dest_reg_type, NULL);
        }
        else
@@ -535,8 +537,9 @@ static int dest (FILE *file, struct brw_instruction *inst)
                                        reg_type_size[inst->bits1.ia1.dest_reg_type]);
            if (inst->bits1.ia1.dest_indirect_offset)
                format (file, " %d", inst->bits1.ia1.dest_indirect_offset);
-           string (file, "]");
-           format (file, "<%d>", inst->bits1.ia1.dest_horiz_stride);
+           string (file, "]<");
+           err |= control (file, "horiz stride", horiz_stride, inst->bits1.ia1.dest_horiz_stride, NULL);
+           string (file, ">");
            err |= control (file, "dest reg encoding", reg_encoding, inst->bits1.ia1.dest_reg_type, NULL);
        }
     }