panfrost: gen_pack: Minor formatting improvement
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 5 Sep 2020 16:03:11 +0000 (18:03 +0200)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 21 Sep 2020 11:34:41 +0000 (07:34 -0400)
Escape the \ in pan_pack() so the end result is actually a multi-line
macro.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

src/panfrost/lib/gen_pack.py

index 5665f42..2dbf2d0 100644 (file)
@@ -131,11 +131,11 @@ __gen_unpack_padded(const uint8_t *restrict cl, uint32_t start, uint32_t end)
    return (2*odd + 1) << shift;
 }
 
-#define pan_pack(dst, T, name)                          \
-   for (struct MALI_ ## T name = { MALI_ ## T ## _header }, \
-        *_loop_terminate = (void *) (dst); \
-        __builtin_expect(_loop_terminate != NULL, 1); \
-        ({ MALI_ ## T ## _pack((uint32_t *) (dst), &name); \
+#define pan_pack(dst, T, name)                              \\
+   for (struct MALI_ ## T name = { MALI_ ## T ## _header }, \\
+        *_loop_terminate = (void *) (dst);                  \\
+        __builtin_expect(_loop_terminate != NULL, 1);       \\
+        ({ MALI_ ## T ## _pack((uint32_t *) (dst), &name);  \\
            _loop_terminate = NULL; }))
 
 """