Mesa (master): i965/fs: Handle printing HW_REGS in dump_instruction().

Matt Turner mattst88 at kemper.freedesktop.org
Thu Oct 17 03:49:57 UTC 2013


Module: Mesa
Branch: master
Commit: 197f3a33fbce525e8f7799466935304d9e24c0f1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=197f3a33fbce525e8f7799466935304d9e24c0f1

Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Oct  8 23:30:08 2013 -0700

i965/fs: Handle printing HW_REGS in dump_instruction().

Scheduling debugging now prints:

Instructions before scheduling (reg_alloc 1)
0: linterp vgrf20, hw_reg2, hw_reg3, hw_reg4,
1: linterp vgrf21, hw_reg2, hw_reg3, hw_reg4+16,

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index f813468..65a4b66 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2827,6 +2827,11 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
    case UNIFORM:
       printf("***u%d***", inst->dst.reg);
       break;
+   case HW_REG:
+      printf("hw_reg%d", inst->dst.fixed_hw_reg.nr);
+      if (inst->dst.fixed_hw_reg.subnr)
+         printf("+%d", inst->dst.fixed_hw_reg.subnr);
+      break;
    default:
       printf("???");
       break;
@@ -2871,6 +2876,17 @@ fs_visitor::dump_instruction(backend_instruction *be_inst)
             break;
          }
          break;
+      case HW_REG:
+         if (inst->src[i].fixed_hw_reg.negate)
+            printf("-");
+         if (inst->src[i].fixed_hw_reg.abs)
+            printf("|");
+         printf("hw_reg%d", inst->src[i].fixed_hw_reg.nr);
+         if (inst->src[i].fixed_hw_reg.subnr)
+            printf("+%d", inst->src[i].fixed_hw_reg.subnr);
+         if (inst->src[i].fixed_hw_reg.abs)
+            printf("|");
+         break;
       default:
          printf("???");
          break;




More information about the mesa-commit mailing list