Mesa (main): pan/va: Move VA_NUM_GENERAL_SLOTS to common
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 21 22:41:34 UTC 2022
Module: Mesa
Branch: main
Commit: 35fcf8d3d7824877df1f75052ea52a6e54541992
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=35fcf8d3d7824877df1f75052ea52a6e54541992
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Jun 16 16:38:35 2022 -0400
pan/va: Move VA_NUM_GENERAL_SLOTS to common
This definition is a hardware property. It's not specific to the flow control
insertion pass, so move it to common code where other passes can use it.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>
---
src/panfrost/bifrost/valhall/va_insert_flow.c | 3 +--
src/panfrost/bifrost/valhall/valhall.h | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/panfrost/bifrost/valhall/va_insert_flow.c b/src/panfrost/bifrost/valhall/va_insert_flow.c
index 1a3e7ed91e0..34bcaa9dc44 100644
--- a/src/panfrost/bifrost/valhall/va_insert_flow.c
+++ b/src/panfrost/bifrost/valhall/va_insert_flow.c
@@ -54,7 +54,6 @@
* be a performance penalty.
*/
-#define BI_NUM_GENERAL_SLOTS 3
#define BI_NUM_REGISTERS 64
/*
@@ -429,7 +428,7 @@ va_insert_flow_control_nops(bi_context *ctx)
* waits on general slots. The dataflow analysis should be ignoring
* the special slots #6 and #7, which are handled separately.
*/
- assert((I->flow & ~BITFIELD_MASK(BI_NUM_GENERAL_SLOTS)) == 0);
+ assert((I->flow & ~BITFIELD_MASK(VA_NUM_GENERAL_SLOTS)) == 0);
bi_flow(ctx, bi_before_instr(I), I->flow);
I->flow = 0;
diff --git a/src/panfrost/bifrost/valhall/valhall.h b/src/panfrost/bifrost/valhall/valhall.h
index 2780c09a09e..07a71cbbaf0 100644
--- a/src/panfrost/bifrost/valhall/valhall.h
+++ b/src/panfrost/bifrost/valhall/valhall.h
@@ -34,6 +34,8 @@
extern "C" {
#endif
+#define VA_NUM_GENERAL_SLOTS 3
+
extern const uint32_t valhall_immediates[32];
enum va_size {
More information about the mesa-commit
mailing list