Mesa (staging/21.2): panfrost: Add foreach_batch iterator

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 26 17:46:44 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: 22dd50563e2c49df88370a013a778b82d6a3aac3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=22dd50563e2c49df88370a013a778b82d6a3aac3

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue Aug 17 16:40:53 2021 +0000

panfrost: Add foreach_batch iterator

Using the active mask.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12528>
(cherry picked from commit 5c4fbae571f0448897f05399b256d4ca48b3a24b)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/panfrost/pan_job.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index cccd0e8220b..7a42b7e7088 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1165,7 +1165,7 @@
         "description": "panfrost: Add foreach_batch iterator",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 6606656d495..a434470c8cb 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -40,6 +40,9 @@
 #include "decode.h"
 #include "panfrost-quirks.h"
 
+#define foreach_batch(ctx, idx) \
+        BITSET_FOREACH_SET(idx, ctx->batches.active, PAN_MAX_BATCHES)
+
 static unsigned
 panfrost_batch_idx(struct panfrost_batch *batch)
 {



More information about the mesa-commit mailing list