summaryrefslogtreecommitdiff
path: root/src/asahi
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2021-07-05 19:26:20 -0400
committerMarge Bot <eric+marge@anholt.net>2021-07-06 13:44:50 +0000
commit8e3f81ccc4006426f833d91ce591e18e7d8416af (patch)
tree594d32465fba793d084e1076e1fc79445efc15dd /src/asahi
parent8d79fdea814ff8bbbabc23781c35372b3c4e803f (diff)
asahi: Add XML for the attachment structure
We need a lot more control over these magic structures to get Z/S attachments working correctly. This is an early start. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Diffstat (limited to 'src/asahi')
-rw-r--r--src/asahi/lib/cmdbuf.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml
index 4b2adf24fb7..8ffae47b2d3 100644
--- a/src/asahi/lib/cmdbuf.xml
+++ b/src/asahi/lib/cmdbuf.xml
@@ -458,4 +458,23 @@
<field name="Local size Z" size="32" start="7:0" type="uint"/>
<field name="Unk" size="32" start="8:0" type="hex" default="0x60000160"/>
</struct>
+
+ <!--- The rest of this file is likely software defined by macOS kernel -->
+ <enum name="IOGPU Attachment Type">
+ <value name="Colour" value="0xA"/>
+ <value name="Depth" value="0xC"/>
+ </enum>
+
+ <struct name="IOGPU Attachment" size="24">
+ <field name="Unk 0" start="0:0" size="16" default="0x100" type="hex"/>
+ <field name="Address" start="0:16" size="48" type="address"/>
+ <field name="Type" start="2:16" size="16" type="IOGPU Attachment Type"/>
+ <field name="Unk 1" start="3:0" size="32" type="hex"/>
+ <field name="Unk 2" start="4:0" size="3" type="hex"/>
+ <field name="Bytes per pixel" start="4:3" size="5" type="uint"/>
+ <field name="Unk 3" start="4:16" size="4" type="hex" default="0xC"/>
+ <!-- Percent of total attachment space used for this attachment, expressed
+ in a decimal percentage [0, 100] <field name="Percent" start="5:16" -->
+ <field name="Percent" start="5:16" size="16" type="uint"/>
+ </struct>
</agxml>