[Mesa-dev] [PATCH 01/16] i965: Print reg_offset for vgrf of size > 1 in dump_instruction().

Matt Turner mattst88 at gmail.com
Thu Dec 19 13:40:15 PST 2013


Previously we wouldn't print the +0 for the first part of a VGRF of size
greater than 1.
---
 src/mesa/drivers/dri/i965/brw_fs.cpp   | 6 +++---
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 00dbe31..1e6ffbc 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2846,7 +2846,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:
@@ -2899,7 +2899,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:
@@ -2907,7 +2907,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:
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 962b4cf..94fc0af 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1241,7 +1241,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) {
-- 
1.8.3.2



More information about the mesa-dev mailing list