diff --git a/src/panfrost/lib/gen_pack.py b/src/panfrost/lib/gen_pack.py index 72cc644b87f..f6a20fdcf74 100644 --- a/src/panfrost/lib/gen_pack.py +++ b/src/panfrost/lib/gen_pack.py @@ -149,17 +149,19 @@ __gen_unpack_padded(const uint8_t *restrict cl, uint32_t start, uint32_t end) #define pan_print(fp, T, var, indent) \\ MALI_ ## T ## _print(fp, &(var), indent) +#define PREFIX(A, B, C, D) MALI_ ## A ## _ ## B ## _ ## C ## _ ## D + #define pan_section_offset(A, S) \\ - MALI_ ## A ## _SECTION_ ## S ## _OFFSET + PREFIX(A, SECTION, S, OFFSET) #define pan_section_ptr(base, A, S) \\ ((void *)((uint8_t *)(base) + pan_section_offset(A, S))) #define pan_section_pack(dst, A, S, name) \\ - for (MALI_ ## A ## _SECTION_ ## S ## _TYPE name = { MALI_ ## A ## _SECTION_ ## S ## _header }, \\ + for (PREFIX(A, SECTION, S, TYPE) name = { PREFIX(A, SECTION, S, header) }, \\ *_loop_terminate = (void *) (dst); \\ __builtin_expect(_loop_terminate != NULL, 1); \\ - ({ MALI_ ## A ## _SECTION_ ## S ## _pack(pan_section_ptr(dst, A, S), &name); \\ + ({ PREFIX(A, SECTION, S, pack) (pan_section_ptr(dst, A, S), &name); \\ _loop_terminate = NULL; })) #define pan_section_unpack(src, A, S, name) \\