Mesa (main): pan/bi: Copy back bi_foreach_successor

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jul 18 02:03:17 UTC 2021


Module: Mesa
Branch: main
Commit: a372368e228ac587c5fad74d381dd16b072da245
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a372368e228ac587c5fad74d381dd16b072da245

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Fri Jul 16 18:33:32 2021 -0400

pan/bi: Copy back bi_foreach_successor

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936>

---

 src/panfrost/bifrost/compiler.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 2de1f69a02e..4bc29dcc96a 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -734,6 +734,14 @@ bi_node_to_index(unsigned node, unsigned node_count)
                         v != NULL; \
                         v = (v == (tuple)->add) ? NULL : (tuple)->add)
 
+#define bi_foreach_successor(blk, v) \
+        bi_block *v; \
+        bi_block **_v; \
+        for (_v = &blk->successors[0], \
+                v = *_v; \
+                v != NULL && _v < &blk->successors[2]; \
+                _v++, v = *_v) \
+
 /* Based on set_foreach, expanded with automatic type casts */
 
 #define bi_foreach_predecessor(blk, v) \



More information about the mesa-commit mailing list