vc4: Add dumping for VC4_PACKET_LOAD/STORE_FULL_RES_TILE_BUFFER.
authorEric Anholt <eric@anholt.net>
Tue, 23 Jun 2015 00:34:24 +0000 (17:34 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 24 Jun 2015 01:40:50 +0000 (18:40 -0700)
src/gallium/drivers/vc4/kernel/vc4_packet.h
src/gallium/drivers/vc4/vc4_cl_dump.c

index 8e6f2a1ac2c5f1fbfca8e5484f928534a0d52ac1..771e2b787619c5e8c31dabc98673ae1bc9948886 100644 (file)
@@ -141,6 +141,16 @@ enum vc4_packet {
 #define VC4_TILING_FORMAT_LT        2
 /** @} */
 
+/** @{
+ *
+ * low bits of VC4_PACKET_STORE_FULL_RES_TILE_BUFFER and
+ * VC4_PACKET_LOAD_FULL_RES_TILE_BUFFER.
+ */
+#define VC4_LOADSTORE_FULL_RES_EOF                     (1 << 3)
+#define VC4_LOADSTORE_FULL_RES_DISABLE_CLEAR_ALL       (1 << 2)
+#define VC4_LOADSTORE_FULL_RES_DISABLE_ZS              (1 << 1)
+#define VC4_LOADSTORE_FULL_RES_DISABLE_COLOR           (1 << 0)
+
 /** @{
  *
  * byte 2 of VC4_PACKET_STORE_TILE_BUFFER_GENERAL and
index 4cc197acd77e9702d11dfc52b3c7fd2282b31207..289d4d6c521984326702a9938f802b6bf45160e1 100644 (file)
@@ -46,6 +46,32 @@ dump_VC4_PACKET_BRANCH_TO_SUB_LIST(void *cl, uint32_t offset, uint32_t hw_offset
                 offset, hw_offset, *addr);
 }
 
+static void
+dump_loadstore_full(void *cl, uint32_t offset, uint32_t hw_offset)
+{
+        uint32_t bits = *(uint32_t *)(cl + offset);
+
+        fprintf(stderr, "0x%08x 0x%08x:      addr 0x%08x%s%s%s%s\n",
+                offset, hw_offset,
+                bits & ~0xf,
+                (bits & VC4_LOADSTORE_FULL_RES_DISABLE_CLEAR_ALL) ? "" : " clear",
+                (bits & VC4_LOADSTORE_FULL_RES_DISABLE_ZS) ? "" : " zs",
+                (bits & VC4_LOADSTORE_FULL_RES_DISABLE_COLOR) ? "" : " color",
+                (bits & VC4_LOADSTORE_FULL_RES_EOF) ? " eof" : "");
+}
+
+static void
+dump_VC4_PACKET_LOAD_FULL_RES_TILE_BUFFER(void *cl, uint32_t offset, uint32_t hw_offset)
+{
+        dump_loadstore_full(cl, offset, hw_offset);
+}
+
+static void
+dump_VC4_PACKET_STORE_FULL_RES_TILE_BUFFER(void *cl, uint32_t offset, uint32_t hw_offset)
+{
+        dump_loadstore_full(cl, offset, hw_offset);
+}
+
 static void
 dump_VC4_PACKET_STORE_TILE_BUFFER_GENERAL(void *cl, uint32_t offset, uint32_t hw_offset)
 {
@@ -313,8 +339,8 @@ static const struct packet_info {
 
         PACKET(VC4_PACKET_STORE_MS_TILE_BUFFER),
         PACKET(VC4_PACKET_STORE_MS_TILE_BUFFER_AND_EOF),
-        PACKET(VC4_PACKET_STORE_FULL_RES_TILE_BUFFER),
-        PACKET(VC4_PACKET_LOAD_FULL_RES_TILE_BUFFER),
+        PACKET_DUMP(VC4_PACKET_STORE_FULL_RES_TILE_BUFFER),
+        PACKET_DUMP(VC4_PACKET_LOAD_FULL_RES_TILE_BUFFER),
         PACKET_DUMP(VC4_PACKET_STORE_TILE_BUFFER_GENERAL),
         PACKET(VC4_PACKET_LOAD_TILE_BUFFER_GENERAL),