asahi: Identify IOGPU Clear Z/S structure
Not sure on the details yet but identify and dump the data structure to start. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>
This commit is contained in:
committed by
Marge Bot
parent
d9c3601e29
commit
535f1c1166
@@ -546,4 +546,14 @@
|
||||
in a decimal percentage [0, 100] <field name="Percent" start="5:16" -->
|
||||
<field name="Percent" start="5:16" size="16" type="uint"/>
|
||||
</struct>
|
||||
|
||||
<struct name="IOGPU Clear Z/S" size="32">
|
||||
<!-- Encoded like the depth attachment -->
|
||||
<field name="Depth clear value" start="2:0" size="32" type="hex"/>
|
||||
<field name="Stencil clear value" start="3:0" size="8" type="uint"/>
|
||||
<field name="Unk 1" start="3:8" size="8" type="hex" default="3"/>
|
||||
<field name="Unk 2" start="5:8" size="8" type="hex" default="1"/>
|
||||
<field name="Z16 Unorm attachment" start="7:8" size="1" type="bool"/>
|
||||
</struct>
|
||||
|
||||
</agxml>
|
||||
|
||||
@@ -443,6 +443,8 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose)
|
||||
DUMP_UNPACKED(IOGPU_HEADER, cmd, "IOGPU Header\n");
|
||||
assert(cmd.attachment_offset_1 == cmd.attachment_offset_2);
|
||||
|
||||
DUMP_CL(IOGPU_CLEAR_Z_S, ((uint32_t *) cmdbuf->ptr.cpu) + 276, "Clear Z/S");
|
||||
|
||||
uint32_t *attachments = (uint32_t *) ((uint8_t *) cmdbuf->ptr.cpu + cmd.attachment_offset_1);
|
||||
unsigned attachment_count = attachments[3];
|
||||
for (unsigned i = 0; i < attachment_count; ++i) {
|
||||
|
||||
@@ -96,12 +96,12 @@ demo_cmdbuf(uint64_t *buf, size_t size,
|
||||
map[226] = unk_buffer_2 & 0xFFFFFFFF;
|
||||
map[227] = unk_buffer_2 >> 32;
|
||||
|
||||
float depth_clear = 1.0;
|
||||
uint8_t stencil_clear = 0;
|
||||
agx_pack(map + 276, IOGPU_CLEAR_Z_S, cfg) {
|
||||
cfg.depth_clear_value = fui(1.0); // 32-bit float
|
||||
cfg.stencil_clear_value = 0;
|
||||
cfg.z16_unorm_attachment = false;
|
||||
}
|
||||
|
||||
map[278] = fui(depth_clear);
|
||||
map[279] = (0x3 << 8) | stencil_clear;
|
||||
map[282] = 0x1000000;
|
||||
map[284] = 0xffffffff;
|
||||
map[285] = 0xffffffff;
|
||||
map[286] = 0xffffffff;
|
||||
|
||||
Reference in New Issue
Block a user