summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2014-08-04 20:25:19 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-08-05 14:56:07 +0200
commit54a7e1fd263f008df7ddad551df5ff72635ad55d (patch)
tree2a038a6ce0c3e4f6a0470c653375fba35ac1345c
parentbc73bd328d22681f7d9670b622706692f956bfb9 (diff)
downloadetna_viv-54a7e1fd263f008df7ddad551df5ff72635ad55d.tar.gz
etna_viv-54a7e1fd263f008df7ddad551df5ff72635ad55d.tar.xz
Improve logging of command buffers
Rather than printing command buffers as one word per line, print 8 words per line. This allows a more condensed view of the command stream. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--src/etnaviv/etna.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/etnaviv/etna.c b/src/etnaviv/etna.c
index 64feb0a..a79f4b1 100644
--- a/src/etnaviv/etna.c
+++ b/src/etnaviv/etna.c
@@ -669,10 +669,13 @@ void etna_dump_cmd_buffer(struct etna_ctx *ctx)
uint32_t start_offset = ctx->cmdbuf[ctx->cur_buf]->startOffset/4 + 8;
uint32_t *buf = &ctx->buf[start_offset];
size_t size = ctx->offset - start_offset;
- fprintf(stderr, "cmdbuf:\n");
- for(unsigned idx=0; idx<size; ++idx)
+ fprintf(stderr, "cmdbuf %u offset %u:\n", ctx->cur_buf, start_offset);
+ for(unsigned idx=0; idx<size; idx+=8)
{
- fprintf(stderr, ":%08x ", buf[idx]);
+ for (unsigned i=idx; i<size && i<idx+8; ++i)
+ {
+ fprintf(stderr, "%08x ", buf[i]);
+ }
fprintf(stderr, "\n");
}
}