v3d: Emit commands to switch CLIF parser to CL/shader/attr input mode.
authorEric Anholt <eric@anholt.net>
Tue, 26 Jun 2018 20:04:09 +0000 (13:04 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 28 Jul 2018 01:00:46 +0000 (18:00 -0700)
By default after saying you are emitting a buffer, it'll expect a buffer
size.  Once you set a format, it'll keep parsing that format until you
announce something else.

src/broadcom/clif/clif_dump.c
src/broadcom/clif/v3dx_dump.c

index 3b693284e494f450438f0e85e1e6ef059dac34c6..6bee7a481b024c9cf216752b8f847cfeeac8afc2 100644 (file)
@@ -129,6 +129,8 @@ clif_dump_cl(struct clif_dump *clif, uint32_t start, uint32_t end)
                 return;
         }
 
+        out(clif, "@format ctrllist\n");
+
         uint32_t size;
         uint8_t *cl = start_vaddr;
         while (clif_dump_packet(clif, start, cl, &size)) {
@@ -152,12 +154,12 @@ clif_dump_gl_shader_state_record(struct clif_dump *clif,
         assert(state);
         assert(attr);
 
-        out(clif, "GL Shader State Record at 0x%08x\n", reloc->addr);
+        out(clif, "@format shadrec_gl_main\n");
         v3d_print_group(clif, state, 0, vaddr);
         vaddr += v3d_group_get_length(state);
 
         for (int i = 0; i < reloc->shader_state.num_attrs; i++) {
-                out(clif, "  Attribute %d\n", i);
+                out(clif, "@format shadrec_gl_attr /* %d */\n", i);
                 v3d_print_group(clif, attr, 0, vaddr);
                 vaddr += v3d_group_get_length(attr);
         }
index 1d1e0b87a9a7b276cc5207b338dac0fb2ba97ce4..2705e2bc79fe30eacf518adb5e08490a558d1a8b 100644 (file)
@@ -91,6 +91,7 @@ v3dX(clif_dump_packet)(struct clif_dump *clif, uint32_t offset,
                         cl += v3d_group_get_length(spec);
                         *size += v3d_group_get_length(spec);
                 }
+                out(clif, "@format ctrllist\n");
                 break;
         }
 #else /* V3D_VERSION < 40 */