asahi: Account for every byte of the cmdbuf
This adds the remaining XML. I don't know how much of this is correct, but it nominally accounts for every byte. So there shouldn't be more surprises in the command buffer after this. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
This commit is contained in:
parent
c61e660323
commit
6aadd72bd4
|
@ -591,7 +591,7 @@
|
|||
<field name="Stencil acceleration buffer 2" start="64:0" size="64" type="address"/>
|
||||
</struct>
|
||||
|
||||
<struct name="IOGPU Aux Framebuffer" size="32">
|
||||
<struct name="IOGPU Aux Framebuffer" size="256">
|
||||
<field name="Unk 0" start="0:0" size="32" default="0x4" type="hex"/>
|
||||
<field name="Unk 1" start="2:0" size="16" default="0xc000" type="hex"/>
|
||||
<field name="Z16 Unorm attachment" start="2:18" size="1" type="bool"/>
|
||||
|
@ -600,7 +600,7 @@
|
|||
<field name="Pointer" start="6:0" size="64" type="address"/>
|
||||
</struct>
|
||||
|
||||
<struct name="IOGPU Clear Z/S" size="48">
|
||||
<struct name="IOGPU Clear Z/S" size="256">
|
||||
<!-- Encoded like the depth attachment -->
|
||||
<field name="Depth clear value" start="0:0" size="32" type="hex"/>
|
||||
<field name="Stencil clear value" start="1:0" size="8" type="uint"/>
|
||||
|
@ -611,6 +611,10 @@
|
|||
<field name="Unk 3" start="6:0" size="32" type="hex" default="0xffffffff"/>
|
||||
<field name="Unk 4" start="7:0" size="32" type="hex" default="0xffffffff"/>
|
||||
<field name="Unk 5" start="8:0" size="32" type="hex" default="0xffffffff"/>
|
||||
<field name="Unk 20" start="20:0" size="32" type="hex" default="0xffff8212"/>
|
||||
<field name="Unk pipeline" start="22:0" size="32" type="address"/>
|
||||
<field name="Unk 28" start="28:0" size="32" type="hex" default="0x12"/>
|
||||
<field name="Unk pipeline 2" start="30:0" size="32" type="hex" default="0x12"/>
|
||||
</struct>
|
||||
|
||||
<struct name="IOGPU Misc" size="288">
|
||||
|
@ -639,4 +643,8 @@
|
|||
<field name="Unk 70:0" start="70:0" size="32" default="1" type="uint"/>
|
||||
</struct>
|
||||
|
||||
<struct name="IOGPU Attachment Count" size="16">
|
||||
<field name="Count" start="3:0" size="32" type="uint"/>
|
||||
</struct>
|
||||
|
||||
</agxml>
|
||||
|
|
|
@ -431,7 +431,7 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose)
|
|||
assert(map != NULL && "nonexistant mapping");
|
||||
|
||||
if (verbose) {
|
||||
agxdecode_dump_bo(cmdbuf, "Command buffer");
|
||||
//agxdecode_dump_bo(cmdbuf, "Command buffer");
|
||||
agxdecode_dump_bo(map, "Mapping");
|
||||
}
|
||||
|
||||
|
@ -452,6 +452,14 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose)
|
|||
|
||||
DUMP_CL(IOGPU_MISC, ((uint32_t *) cmdbuf->ptr.cpu) + 356, "Misc");
|
||||
|
||||
/* Should be unused, we think */
|
||||
for (unsigned i = (0x6B0 / 4); i < (cmd.attachment_offset / 4); ++i) {
|
||||
assert(((uint32_t *) cmdbuf->ptr.cpu)[i] == 0);
|
||||
}
|
||||
|
||||
DUMP_CL(IOGPU_ATTACHMENT_COUNT, ((uint8_t *) cmdbuf->ptr.cpu +
|
||||
cmd.attachment_offset), "Attachment count");
|
||||
|
||||
uint32_t *attachments = (uint32_t *) ((uint8_t *) cmdbuf->ptr.cpu + cmd.attachment_offset);
|
||||
unsigned attachment_count = attachments[3];
|
||||
for (unsigned i = 0; i < attachment_count; ++i) {
|
||||
|
@ -459,7 +467,6 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose)
|
|||
DUMP_CL(IOGPU_ATTACHMENT, ptr, "Attachment");
|
||||
}
|
||||
|
||||
/* TODO: What else is in here? */
|
||||
uint64_t *encoder = ((uint64_t *) cmdbuf->ptr.cpu) + 7;
|
||||
agxdecode_stateful(*encoder, "Encoder", agxdecode_cmd, verbose);
|
||||
|
||||
|
|
|
@ -229,13 +229,10 @@ demo_cmdbuf(uint64_t *buf, size_t size,
|
|||
agx_pack(map + 292, IOGPU_CLEAR_Z_S, cfg) {
|
||||
cfg.depth_clear_value = fui(clear_depth);
|
||||
cfg.stencil_clear_value = clear_stencil;
|
||||
cfg.unk_pipeline = pipeline_null | 0x4;
|
||||
cfg.unk_pipeline_2 = pipeline_store | 0x4;
|
||||
}
|
||||
|
||||
map[312] = 0xffff8212;
|
||||
map[314] = pipeline_null | 0x4;
|
||||
map[320] = 0x12;
|
||||
map[322] = pipeline_store | 0x4;
|
||||
|
||||
agx_pack(map + 356, IOGPU_MISC, cfg) {
|
||||
cfg.depth_buffer = depth_buffer;
|
||||
cfg.stencil_buffer = stencil_buffer;
|
||||
|
|
Loading…
Reference in New Issue