Mesa (main): pan/bi: Add u_worklist wrapper macros
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 3 18:20:09 UTC 2022
Module: Mesa
Branch: main
Commit: 89db71893688eabd67f4dcaa6628500f4811e058
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=89db71893688eabd67f4dcaa6628500f4811e058
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Tue Apr 19 14:00:10 2022 -0400
pan/bi: Add u_worklist wrapper macros
..expanding to bi_block.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16279>
---
src/panfrost/bifrost/compiler.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 3e9c23ec5c5..c3cf7868959 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -33,6 +33,7 @@
#include "panfrost/util/pan_ir.h"
#include "util/u_math.h"
#include "util/half_float.h"
+#include "util/u_worklist.h"
#ifdef __cplusplus
extern "C" {
@@ -1344,6 +1345,14 @@ bi_instance_id(bi_builder *b)
return bi_register((b->shader->arch >= 9) ? 61 : 62);
}
+#define bi_worklist_init(ctx, w) u_worklist_init(w, ctx->num_blocks, ctx)
+#define bi_worklist_push_head(w, block) u_worklist_push_head(w, block, index)
+#define bi_worklist_push_tail(w, block) u_worklist_push_tail(w, block, index)
+#define bi_worklist_peek_head(w) u_worklist_peek_head(w, bi_block, index)
+#define bi_worklist_pop_head(w) u_worklist_pop_head( w, bi_block, index)
+#define bi_worklist_peek_tail(w) u_worklist_peek_tail(w, bi_block, index)
+#define bi_worklist_pop_tail(w) u_worklist_pop_tail( w, bi_block, index)
+
/* NIR passes */
bool bi_lower_divergent_indirects(nir_shader *shader, unsigned lanes);
More information about the mesa-commit
mailing list