diff options
author | Russell King <rmk@arm.linux.org.uk> | 2014-08-04 20:25:19 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-05 14:56:07 +0200 |
commit | 54a7e1fd263f008df7ddad551df5ff72635ad55d (patch) | |
tree | 2a038a6ce0c3e4f6a0470c653375fba35ac1345c | |
parent | bc73bd328d22681f7d9670b622706692f956bfb9 (diff) | |
download | etna_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.c | 9 |
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"); } } |