diff options
-rw-r--r-- | src/broadcom/cle/v3d_decoder.c | 17 | ||||
-rw-r--r-- | src/broadcom/cle/v3d_decoder.h | 7 | ||||
-rw-r--r-- | src/broadcom/clif/clif_dump.c | 4 | ||||
-rw-r--r-- | src/broadcom/clif/v3dx_dump.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_cl_dump.c | 2 |
5 files changed, 15 insertions, 23 deletions
diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c index de57e5f5acb..f97aa6604cb 100644 --- a/src/broadcom/cle/v3d_decoder.c +++ b/src/broadcom/cle/v3d_decoder.c @@ -742,14 +742,12 @@ v3d_group_get_length(struct v3d_group *group) void v3d_field_iterator_init(struct v3d_field_iterator *iter, struct v3d_group *group, - const uint8_t *p, - bool print_colors) + const uint8_t *p) { memset(iter, 0, sizeof(*iter)); iter->group = group; iter->p = p; - iter->print_colors = print_colors; } static const char * @@ -865,14 +863,11 @@ v3d_field_iterator_next(struct v3d_field_iterator *iter) enum_name = v3d_get_enum_name(&iter->field->inline_enum, value); break; } - case V3D_TYPE_BOOL: { - const char *true_string = - iter->print_colors ? "\e[0;35mtrue\e[0m" : "true"; + case V3D_TYPE_BOOL: snprintf(iter->value, sizeof(iter->value), "%s", __gen_unpack_uint(iter->p, s, e) ? - true_string : "false"); + "1 /* true */" : "0 /* false */"); break; - } case V3D_TYPE_FLOAT: snprintf(iter->value, sizeof(iter->value), "%f", __gen_unpack_float(iter->p, s, e)); @@ -926,18 +921,18 @@ v3d_field_iterator_next(struct v3d_field_iterator *iter) void v3d_print_group(struct clif_dump *clif, struct v3d_group *group, - uint64_t offset, const uint8_t *p, bool color) + uint64_t offset, const uint8_t *p) { struct v3d_field_iterator iter; - v3d_field_iterator_init(&iter, group, p, color); + v3d_field_iterator_init(&iter, group, p); while (v3d_field_iterator_next(&iter)) { fprintf(clif->out, " %s: %s\n", iter.name, iter.value); if (iter.struct_desc) { uint64_t struct_offset = offset + iter.offset; v3d_print_group(clif, iter.struct_desc, struct_offset, - &p[iter.offset], color); + &p[iter.offset]); } } } diff --git a/src/broadcom/cle/v3d_decoder.h b/src/broadcom/cle/v3d_decoder.h index 2987f3920a1..e147b1ea703 100644 --- a/src/broadcom/cle/v3d_decoder.h +++ b/src/broadcom/cle/v3d_decoder.h @@ -58,7 +58,6 @@ struct v3d_field_iterator { int group_iter; struct v3d_field *field; - bool print_colors; }; struct v3d_group { @@ -135,14 +134,12 @@ struct v3d_field { void v3d_field_iterator_init(struct v3d_field_iterator *iter, struct v3d_group *group, - const uint8_t *p, - bool print_colors); + const uint8_t *p); bool v3d_field_iterator_next(struct v3d_field_iterator *iter); void v3d_print_group(struct clif_dump *clif, struct v3d_group *group, - uint64_t offset, const uint8_t *p, - bool color); + uint64_t offset, const uint8_t *p); #endif /* V3D_DECODER_H */ diff --git a/src/broadcom/clif/clif_dump.c b/src/broadcom/clif/clif_dump.c index b48a156c5fa..f297c774b5a 100644 --- a/src/broadcom/clif/clif_dump.c +++ b/src/broadcom/clif/clif_dump.c @@ -143,12 +143,12 @@ clif_dump_gl_shader_state_record(struct clif_dump *clif, assert(attr); out(clif, "GL Shader State Record at 0x%08x\n", reloc->addr); - v3d_print_group(clif, state, 0, vaddr, ""); + 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); - v3d_print_group(clif, attr, 0, vaddr, ""); + 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 2229fe9d25c..1d1e0b87a9a 100644 --- a/src/broadcom/clif/v3dx_dump.c +++ b/src/broadcom/clif/v3dx_dump.c @@ -47,7 +47,7 @@ v3dX(clif_dump_packet)(struct clif_dump *clif, uint32_t offset, *size = v3d_group_get_length(inst); out(clif, "%s\n", v3d_group_get_name(inst)); - v3d_print_group(clif, inst, 0, cl, ""); + v3d_print_group(clif, inst, 0, cl); switch (*cl) { case V3DX(GL_SHADER_STATE_opcode): { @@ -87,7 +87,7 @@ 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, ""); + v3d_print_group(clif, spec, 0, cl); cl += v3d_group_get_length(spec); *size += v3d_group_get_length(spec); } @@ -107,13 +107,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, ""); + 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, ""); + v3d_print_group(clif, addr, 0, cl); cl += v3d_group_get_length(addr); *size += v3d_group_get_length(addr); } diff --git a/src/gallium/drivers/vc4/vc4_cl_dump.c b/src/gallium/drivers/vc4/vc4_cl_dump.c index bd2d7137c58..bb26b057a44 100644 --- a/src/gallium/drivers/vc4/vc4_cl_dump.c +++ b/src/gallium/drivers/vc4/vc4_cl_dump.c @@ -63,7 +63,7 @@ vc4_dump_cl(void *cl, uint32_t size, bool is_render) fprintf(stderr, "0x%08x 0x%08x: 0x%02x %s\n", offset, hw_offset, header, v3d_group_get_name(inst)); - v3d_print_group(clif, inst, offset, p, ""); + v3d_print_group(clif, inst, offset, p); switch (header) { case VC4_PACKET_HALT: |