From: Eric Anholt Date: Tue, 26 Jun 2018 20:04:09 +0000 (-0700) Subject: v3d: Emit commands to switch CLIF parser to CL/shader/attr input mode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ee0ab599e5bad16593256d54b1c83acd9926290;p=mesa.git 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. --- 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 */