summaryrefslogtreecommitdiffstats
path: root/src/broadcom/clif
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-06-26 13:04:09 -0700
committerEric Anholt <[email protected]>2018-07-27 18:00:46 -0700
commit3ee0ab599e5bad16593256d54b1c83acd9926290 (patch)
tree08475f23a96e5a8866543b9ffe0631adf7373163 /src/broadcom/clif
parenta57770aa37f2c97125ed10e54e9385bcc38c3811 (diff)
v3d: Emit commands to switch CLIF parser to CL/shader/attr input mode.
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.
Diffstat (limited to 'src/broadcom/clif')
-rw-r--r--src/broadcom/clif/clif_dump.c6
-rw-r--r--src/broadcom/clif/v3dx_dump.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/broadcom/clif/clif_dump.c b/src/broadcom/clif/clif_dump.c
index 3b693284e49..6bee7a481b0 100644
--- a/src/broadcom/clif/clif_dump.c
+++ b/src/broadcom/clif/clif_dump.c
@@ -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);
}
diff --git a/src/broadcom/clif/v3dx_dump.c b/src/broadcom/clif/v3dx_dump.c
index 1d1e0b87a9a..2705e2bc79f 100644
--- a/src/broadcom/clif/v3dx_dump.c
+++ b/src/broadcom/clif/v3dx_dump.c
@@ -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 */