From: Alyssa Rosenzweig Date: Thu, 16 Dec 2021 02:15:55 +0000 (-0500) Subject: asahi: Add XML for unknown 0x4a packet X-Git-Tag: upstream/22.3.5~13930 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc5a72be2fd7cd7f882ea3c0105b1f3d6d687eac;p=platform%2Fupstream%2Fmesa.git asahi: Add XML for unknown 0x4a packet Enough bits of this packet are known that open-coding hex bytes for it is annoying. Add some XML correpsonding to what we know. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml index f975eae..2925ee2 100644 --- a/src/asahi/lib/cmdbuf.xml +++ b/src/asahi/lib/cmdbuf.xml @@ -302,6 +302,23 @@ + + + + + + + + + + + + + + + + + diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 3180db8..346e5f7 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -1382,24 +1382,17 @@ demo_rasterizer(struct agx_context *ctx, struct agx_pool *pool, bool is_points) static uint64_t demo_unk11(struct agx_pool *pool, bool prim_lines, bool prim_points, bool reads_tib) { -#define UNK11_FILL_MODE_LINES_1 (1 << 26) + struct agx_ptr T = agx_pool_alloc_aligned(pool, AGX_UNKNOWN_4A_LENGTH, 64); -#define UNK11_FILL_MODE_LINES_2 (0x5004 << 16) -#define UNK11_LINES (0x10000000) -#define UNK11_POINTS (0x40000000) + agx_pack(T.cpu, UNKNOWN_4A, cfg) { + cfg.lines_or_points = (prim_lines || prim_points); + cfg.reads_tilebuffer = reads_tib; -#define UNK11_READS_TIB (0x20000000) - - uint32_t unk[] = { - 0x200004a, - 0x200 | ((prim_lines || prim_points) ? UNK11_FILL_MODE_LINES_1 : 0) | (reads_tib ? UNK11_READS_TIB : 0), - 0x7e00000 | (prim_lines ? UNK11_LINES : 0) | (prim_points ? UNK11_POINTS : 0), - 0x7e00000 | (prim_lines ? UNK11_LINES : 0) | (prim_points ? UNK11_POINTS : 0), - - 0x1ffff + cfg.front.lines = cfg.back.lines = prim_lines; + cfg.front.points = cfg.back.points = prim_points; }; - return agx_pool_upload(pool, unk, sizeof(unk)); + return T.gpu; } static uint64_t