diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml
index 61413252f9f..4255b73e053 100644
--- a/src/asahi/lib/cmdbuf.xml
+++ b/src/asahi/lib/cmdbuf.xml
@@ -611,10 +611,12 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c
index f82659e4a9b..754771589cd 100644
--- a/src/asahi/lib/decode.c
+++ b/src/asahi/lib/decode.c
@@ -444,7 +444,10 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose)
DUMP_CL(IOGPU_INTERNAL_PIPELINES, ((uint32_t *) cmdbuf->ptr.cpu) + 160, "Internal pipelines");
DUMP_CL(IOGPU_AUX_FRAMEBUFFER, ((uint32_t *) cmdbuf->ptr.cpu) + 228, "Aux Framebuffer");
- DUMP_CL(IOGPU_CLEAR_Z_S, ((uint32_t *) cmdbuf->ptr.cpu) + 292, "Clear Z/S");
+
+ agx_unpack(agxdecode_dump_stream, ((uint32_t *) cmdbuf->ptr.cpu) + 292,
+ IOGPU_CLEAR_Z_S, clearzs);
+ DUMP_UNPACKED(IOGPU_CLEAR_Z_S, clearzs, "Clear Z/S");
/* Guard against changes */
uint32_t zeroes[356 - 344] = { 0 };
@@ -484,6 +487,17 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose)
agxdecode_pipeline, verbose);
}
+ assert((clearzs.depth_clear_pipeline_unk & 0xF) == 0x4);
+ if (clearzs.depth_clear_pipeline) {
+ agxdecode_stateful(clearzs.depth_clear_pipeline,
+ "Depth clear pipeline", agxdecode_pipeline, verbose);
+ }
+
+ if (clearzs.depth_store_pipeline) {
+ agxdecode_stateful(clearzs.depth_store_pipeline,
+ "Depth store pipeline", agxdecode_pipeline, verbose);
+ }
+
agxdecode_map_read_write();
}
diff --git a/src/gallium/drivers/asahi/magic.c b/src/gallium/drivers/asahi/magic.c
index 8a6721b9ae3..3e1e07b6d58 100644
--- a/src/gallium/drivers/asahi/magic.c
+++ b/src/gallium/drivers/asahi/magic.c
@@ -229,8 +229,12 @@ 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;
+
+ cfg.depth_clear_pipeline_bind = 0xffff8002 | (clear_pipeline_textures ? 0x210 : 0);
+ cfg.depth_clear_pipeline = pipeline_null;
+
+ cfg.depth_store_pipeline_bind = 0x12;
+ cfg.depth_store_pipeline = pipeline_store;
}
agx_pack(map + 356, IOGPU_MISC, cfg) {