From c1d8ed1bc213bac4db9bf77c880c648f1e074a4a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 5 Jul 2021 19:45:41 -0400 Subject: [PATCH] asahi: Move IOGPU header to XML Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/cmdbuf.xml | 10 ++++++++++ src/gallium/drivers/asahi/magic.c | 13 ++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml index 8ffae47b2d3..8398cf29181 100644 --- a/src/asahi/lib/cmdbuf.xml +++ b/src/asahi/lib/cmdbuf.xml @@ -465,6 +465,16 @@ + + + + + + + + + + diff --git a/src/gallium/drivers/asahi/magic.c b/src/gallium/drivers/asahi/magic.c index e81c400cc17..fc575144298 100644 --- a/src/gallium/drivers/asahi/magic.c +++ b/src/gallium/drivers/asahi/magic.c @@ -242,13 +242,12 @@ demo_cmdbuf(uint64_t *buf, size_t size, unsigned total_size = (cmdbuf->offset * 4); - cmdbuf->map[0] = 0x10000; - cmdbuf->map[1] = total_size; - cmdbuf->map[2] = 7; - cmdbuf->map[8] = offset_attachments; - cmdbuf->map[9] = 0x18; - cmdbuf->map[10] = offset_attachments; - cmdbuf->map[11] = offset_unk; + agx_pack(cmdbuf->map, IOGPU_HEADER, cfg) { + cfg.total_size = total_size; + cfg.attachment_offset_1 = offset_attachments; + cfg.attachment_offset_2 = offset_attachments; + cfg.unknown_offset = offset_unk; + } return total_size; }