asahi: Decode resource allocation responses

We already know much of this structure, let's pretty print to simplify
our traces.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
This commit is contained in:
Alyssa Rosenzweig 2022-04-03 10:24:50 -04:00
parent a5e774ef9e
commit 0c120cf141
1 changed files with 21 additions and 0 deletions

View File

@ -187,6 +187,27 @@ agx_memory_type_name(uint32_t type)
}
}
struct agx_allocate_resource_resp {
/* Returned GPU virtual address */
uint64_t gpu_va;
/* Returned CPU virtual address */
uint64_t cpu;
uint32_t unk4[3];
/* Handle used to identify the resource in the segment list */
uint32_t handle;
/* Size of the allocated resource */
uint64_t size;
/* Globally unique identifier for the resource, shown in Instruments */
uint32_t guid;
uint32_t unk11[10];
} __attribute__((packed));
struct agx_notification_queue {
#ifdef __APPLE__
mach_port_t port;