diff options
author | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2021-07-10 12:30:09 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2021-07-10 12:34:40 -0400 |
commit | 9854079d59c2d424367646f1c27ac2940b9b19e5 (patch) | |
tree | e280c1fc6bd62d24eea41c9f59a2d3c443401a61 | |
parent | d5580ee805a8790cf1f2e44898d188b6ff9d3402 (diff) |
asahi/decode: Fix up high word
Not sure what's happening here, there's some magic for sure.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815>
-rw-r--r-- | src/asahi/lib/decode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c index a9fabdf74f8..a7bf8e4f355 100644 --- a/src/asahi/lib/decode.c +++ b/src/asahi/lib/decode.c @@ -217,6 +217,7 @@ agxdecode_map_read_write(void) #define agxdecode_msg(str) fprintf(agxdecode_dump_stream, "// %s", str) unsigned agxdecode_indent = 0; +uint64_t pipeline_base = 0; static void agxdecode_dump_bo(struct agx_bo *bo, const char *name) @@ -376,6 +377,8 @@ agxdecode_record(uint64_t va, size_t size, bool verbose) } DUMP_UNPACKED(BIND_PIPELINE, cmd, "Bind fragment pipeline\n"); + } else if (size == 0) { + pipeline_base = va; } else { fprintf(agxdecode_dump_stream, "Record %" PRIx64 "\n", va); hexdump(agxdecode_dump_stream, map, size, false); @@ -408,6 +411,12 @@ agxdecode_cmd(const uint8_t *map, bool verbose) } else if (map[1] == 0x00 && map[2] == 0x00) { /* No need to explicitly dump the record */ agx_unpack(agxdecode_dump_stream, map, RECORD, cmd); + + /* XXX: Why? */ + if (pipeline_base && ((cmd.data >> 32) == 0)) { + cmd.data |= pipeline_base & 0xFF00000000ull; + } + struct agx_bo *mem = agxdecode_find_mapped_gpu_mem_containing(cmd.data); if (mem) |