summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-06-25 15:20:22 -0700
committerEric Anholt <[email protected]>2018-07-30 14:29:01 -0700
commit8da47b7648f6e785bb0f177d1c3824ca0e1792a4 (patch)
tree86cdecbff2fb571454aa3acc55fddb46ce702000
parent103f21b13d839ccd011b06b5708e7b9c1b8d228e (diff)
v3d: When not doing terminal pretty-printing, comment struct field names.
The struct field names aren't part of the CLIF ABI, just the order of fields within the struct. The comments are there for human readability.
-rw-r--r--src/broadcom/cle/v3d_decoder.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c
index 22367ca6f76..084fc64d365 100644
--- a/src/broadcom/cle/v3d_decoder.c
+++ b/src/broadcom/cle/v3d_decoder.c
@@ -975,7 +975,13 @@ v3d_print_group(struct clif_dump *clif, struct v3d_group *group,
strcmp(iter.field->name, "Pad") == 0)
continue;
- fprintf(clif->out, " %s: %s\n", iter.name, iter.value);
+ if (clif->pretty) {
+ fprintf(clif->out, " %s: %s\n",
+ iter.name, iter.value);
+ } else {
+ fprintf(clif->out, " /* %30s: */ %s\n",
+ iter.name, iter.value);
+ }
if (iter.struct_desc) {
uint64_t struct_offset = offset + iter.offset;
v3d_print_group(clif, iter.struct_desc,