i965: Print reg_offset for vgrf of size > 1 in dump_instruction().
authorMatt Turner <mattst88@gmail.com>
Wed, 4 Dec 2013 23:01:16 +0000 (15:01 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 21 Jan 2014 22:09:33 +0000 (14:09 -0800)
Previously we wouldn't print the +0 for the first part of a VGRF of size
greater than 1.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vec4.cpp

index 9a0ae9e857e165805ee3a86b1bebde73af229618..3fdb3c9ea028b87895bf100425f6cdc394db78fb 100644 (file)
@@ -2857,7 +2857,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
    switch (inst->dst.file) {
    case GRF:
       printf("vgrf%d", inst->dst.reg);
-      if (inst->dst.reg_offset)
+      if (virtual_grf_sizes[inst->dst.reg] != 1)
          printf("+%d", inst->dst.reg_offset);
       break;
    case MRF:
@@ -2910,7 +2910,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
       switch (inst->src[i].file) {
       case GRF:
          printf("vgrf%d", inst->src[i].reg);
-         if (inst->src[i].reg_offset)
+         if (virtual_grf_sizes[inst->src[i].reg] != 1)
             printf("+%d", inst->src[i].reg_offset);
          break;
       case MRF:
@@ -2918,7 +2918,7 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
          break;
       case UNIFORM:
          printf("u%d", inst->src[i].reg);
-         if (inst->src[i].reg_offset)
+         if (virtual_grf_sizes[inst->src[i].reg] != 1)
             printf(".%d", inst->src[i].reg_offset);
          break;
       case BAD_FILE:
index 2a0cb138587c785d88d6ef78e20079e13c34b603..f4f4019a8afc5e82b341bce59d20433d0f84570a 100644 (file)
@@ -1242,7 +1242,7 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst)
          break;
       }
 
-      if (inst->src[i].reg_offset)
+      if (virtual_grf_sizes[inst->src[i].reg] != 1)
          printf(".%d", inst->src[i].reg_offset);
 
       if (inst->src[i].file != IMM) {