diff options
Diffstat (limited to 'src/broadcom/clif/v3dx_dump.c')
-rw-r--r-- | src/broadcom/clif/v3dx_dump.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/broadcom/clif/v3dx_dump.c b/src/broadcom/clif/v3dx_dump.c index b10b1c92a5a..9cf59f88920 100644 --- a/src/broadcom/clif/v3dx_dump.c +++ b/src/broadcom/clif/v3dx_dump.c @@ -59,7 +59,7 @@ clif_name(const char *xml_name) bool v3dX(clif_dump_packet)(struct clif_dump *clif, uint32_t offset, - const uint8_t *cl, uint32_t *size) + const uint8_t *cl, uint32_t *size, bool reloc_mode) { struct v3d_group *inst = v3d_spec_find_instruction(clif->spec, cl); if (!inst) { @@ -69,23 +69,27 @@ v3dX(clif_dump_packet)(struct clif_dump *clif, uint32_t offset, *size = v3d_group_get_length(inst); - char *name = clif_name(v3d_group_get_name(inst)); - out(clif, "%s\n", name); - free(name); - v3d_print_group(clif, inst, 0, cl); + if (!reloc_mode) { + char *name = clif_name(v3d_group_get_name(inst)); + out(clif, "%s\n", name); + free(name); + v3d_print_group(clif, inst, 0, cl); + } switch (*cl) { case V3DX(GL_SHADER_STATE_opcode): { struct V3DX(GL_SHADER_STATE) values; V3DX(GL_SHADER_STATE_unpack)(cl, &values); - struct reloc_worklist_entry *reloc = - clif_dump_add_address_to_worklist(clif, - reloc_gl_shader_state, - values.address); - if (reloc) { - reloc->shader_state.num_attrs = - values.number_of_attribute_arrays; + if (reloc_mode) { + struct reloc_worklist_entry *reloc = + clif_dump_add_address_to_worklist(clif, + reloc_gl_shader_state, + values.address); + if (reloc) { + reloc->shader_state.num_attrs = + values.number_of_attribute_arrays; + } } return true; } @@ -112,11 +116,13 @@ v3dX(clif_dump_packet)(struct clif_dump *clif, uint32_t offset, cl += *size; for (int i = 0; i < values.number_of_16_bit_output_data_specs_following; i++) { - v3d_print_group(clif, spec, 0, cl); + if (!reloc_mode) + v3d_print_group(clif, spec, 0, cl); cl += v3d_group_get_length(spec); *size += v3d_group_get_length(spec); } - out(clif, "@format ctrllist\n"); + if (!reloc_mode) + out(clif, "@format ctrllist\n"); break; } #else /* V3D_VERSION < 40 */ @@ -133,13 +139,15 @@ v3dX(clif_dump_packet)(struct clif_dump *clif, uint32_t offset, cl += *size; for (int i = 0; i < values.number_of_16_bit_output_data_specs_following; i++) { - v3d_print_group(clif, spec, 0, cl); + if (!reloc_mode) + v3d_print_group(clif, spec, 0, cl); cl += v3d_group_get_length(spec); *size += v3d_group_get_length(spec); } for (int i = 0; i < values.number_of_32_bit_output_buffer_address_following; i++) { - v3d_print_group(clif, addr, 0, cl); + if (!reloc_mode) + v3d_print_group(clif, addr, 0, cl); cl += v3d_group_get_length(addr); *size += v3d_group_get_length(addr); } |