diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml index cd1abbb3082..61413252f9f 100644 --- a/src/asahi/lib/cmdbuf.xml +++ b/src/asahi/lib/cmdbuf.xml @@ -591,7 +591,7 @@ - + @@ -600,7 +600,7 @@ - + @@ -611,6 +611,10 @@ + + + + @@ -639,4 +643,8 @@ + + + + diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c index e0c21d79aaf..f82659e4a9b 100644 --- a/src/asahi/lib/decode.c +++ b/src/asahi/lib/decode.c @@ -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); diff --git a/src/gallium/drivers/asahi/magic.c b/src/gallium/drivers/asahi/magic.c index d6b15f7dfcd..8a6721b9ae3 100644 --- a/src/gallium/drivers/asahi/magic.c +++ b/src/gallium/drivers/asahi/magic.c @@ -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;