r300-gallium: Improve vs debug more.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Fri, 5 Jun 2009 06:25:46 +0000 (23:25 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Fri, 5 Jun 2009 06:27:46 +0000 (23:27 -0700)
Still not showing me why my stuff's failing, but getting there.

src/gallium/drivers/r300/r300_debug.c
src/gallium/drivers/r300/r300_debug.h

index 1a8c17b28d648350626c7e12ce53803d8ca1f4c1..678cd2b81210dbae439b4332c794a8080af5f706 100644 (file)
@@ -152,6 +152,8 @@ void r500_fs_dump(struct r500_fragment_shader* fs)
 
 static void r300_vs_op_dump(uint32_t op)
 {
+    debug_printf(" dst: %d%s op: ",
+            (op >> 13) & 0x7f, r300_vs_dst_debug[(op >> 8) & 0x7]);
     if (op & 0x80) {
         if (op & 0x1) {
             debug_printf("PVS_MACRO_OP_2CLK_M2X_ADD\n");
@@ -167,7 +169,8 @@ static void r300_vs_op_dump(uint32_t op)
 
 void r300_vs_src_dump(uint32_t src)
 {
-    debug_printf(" %s%s/%s%s/%s%s/%s%s\n",
+    debug_printf(" reg: %d%s swiz: %s%s/%s%s/%s%s/%s%s\n",
+            (src >> 5) & 0x7f, r300_vs_src_debug[src & 0x3],
             src & (1 << 25) ? "-" : " ",
             r300_vs_swiz_debug[(src >> 13) & 0x7],
             src & (1 << 26) ? "-" : " ",
index 3939d834c23832d046667ee734ddb1f3ed72f028..c86410ec0a964cb2bc69f90e9b20cedeb1ae4e67 100644 (file)
@@ -174,6 +174,24 @@ static char* r300_vs_me_ops[] = {
 };
 
 /* XXX refactor to avoid clashing symbols */
+static char* r300_vs_src_debug[] = {
+    "t",
+    "i",
+    "c",
+    "a",
+};
+
+static char* r300_vs_dst_debug[] = {
+    "t",
+    "a0",
+    "o",
+    "ox",
+    "a",
+    "i",
+    "u",
+    "u",
+};
+
 static char* r300_vs_swiz_debug[] = {
     "X",
     "Y",