From 14d966734f62d866ea8ad883fd3c69b9349299d7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 3 Apr 2022 11:13:01 -0400 Subject: [PATCH] asahi: Identify suballocation mechanism Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/io.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/asahi/lib/io.h b/src/asahi/lib/io.h index 65775597c64..b80a8f3d1c0 100644 --- a/src/asahi/lib/io.h +++ b/src/asahi/lib/io.h @@ -192,9 +192,18 @@ struct agx_allocate_resource_req { uint32_t mode; uint32_t unk6[6]; uint64_t cpu_fixed; - uint64_t cpu_fixed_2; + uint64_t cpu_fixed_parent; uint32_t size; - uint32_t unk17[3]; + uint32_t unk17; + + /* Handle of the parent resource when a suballocation is requested. + * Based on an assertion failure, this corresponds to: + * + * -[IOGPUMetalBuffer initWithPrimaryBuffer:heapIndex:bufferIndex:bufferOffset:length:args:argsSize:] + */ + uint32_t parent; + + uint32_t unk19; uint32_t flags; uint32_t unk21[3]; } __attribute__((packed));