diff options
author | Kenneth Graunke <[email protected]> | 2014-05-15 15:58:07 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-05-18 23:35:17 -0700 |
commit | 4a2f0e305ce30ac4dfc2ad3c380711a7aff3f63b (patch) | |
tree | 6dfed63b6f218895d14a0485b7882a7c35f85eb6 /src/mesa | |
parent | 3285bc97ef9f5f6bdf38ced121ddedd111a5e410 (diff) |
i965: Fix dump_prog_cache to handle compacted instructions.
dump_prog_cache has interpreted compacted instructions as full size
instructions, decoding garbage and complaining about invalid values.
We can just use brw_dump_compile to handle this correctly in less code.
The output format changes slightly, but it's still perfectly acceptable.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_dump.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c index 57dd2e77b9b..5cc5ac6a8a5 100644 --- a/src/mesa/drivers/dri/i965/brw_state_dump.c +++ b/src/mesa/drivers/dri/i965/brw_state_dump.c @@ -30,6 +30,7 @@ #include "brw_context.h" #include "brw_defines.h" +#include "brw_eu.h" static void batch_out(struct brw_context *brw, const char *name, uint32_t offset, @@ -486,8 +487,7 @@ static void dump_prog_cache(struct brw_context *brw) { struct brw_cache *cache = &brw->cache; - unsigned int b, i; - uint32_t *data; + unsigned int b; drm_intel_bo_map(brw->cache.bo, false); @@ -496,9 +496,6 @@ dump_prog_cache(struct brw_context *brw) for (item = cache->items[b]; item; item = item->next) { const char *name; - uint32_t offset = item->offset; - - data = brw->cache.bo->virtual + item->offset; switch (item->cache_id) { case BRW_VS_PROG: @@ -524,14 +521,9 @@ dump_prog_cache(struct brw_context *brw) break; } - for (i = 0; i < item->size / 4 / 4; i++) { - fprintf(stderr, "0x%08x: %8s: 0x%08x 0x%08x 0x%08x 0x%08x ", - offset + i * 4 * 4, - name, - data[i * 4], data[i * 4 + 1], data[i * 4 + 2], data[i * 4 + 3]); - - brw_disasm(stderr, (void *)(data + i * 4), brw->gen, false); - } + fprintf(stderr, "%s:\n", name); + brw_dump_compile(brw, brw->cache.bo->virtual, item->offset, item->size, + stderr); } } |