Mesa (master): panfrost: Allocate pool BOs against the pool

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 9 15:06:17 UTC 2020


Module: Mesa
Branch: master
Commit: 6ef7c05746f5f0c5053b6e228096a776377adecf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ef7c05746f5f0c5053b6e228096a776377adecf

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue Jul  7 15:11:42 2020 -0400

panfrost: Allocate pool BOs against the pool

Instead of against the owning batch, to decouple.

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

---

 src/gallium/drivers/panfrost/pan_allocate.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_allocate.c b/src/gallium/drivers/panfrost/pan_allocate.c
index a0ca7eb0e68..4785f9a3529 100644
--- a/src/gallium/drivers/panfrost/pan_allocate.c
+++ b/src/gallium/drivers/panfrost/pan_allocate.c
@@ -85,11 +85,14 @@ panfrost_allocate_transient(struct panfrost_batch *batch, size_t sz)
                  * flags to this function and keep the read/write,
                  * fragment/vertex+tiler pools separate.
                  */
-                bo = panfrost_batch_create_bo(batch, bo_sz, 0,
-                                              PAN_BO_ACCESS_PRIVATE |
-                                              PAN_BO_ACCESS_RW |
-                                              PAN_BO_ACCESS_VERTEX_TILER |
-                                              PAN_BO_ACCESS_FRAGMENT);
+                bo = pan_bo_create(pan_device(batch->ctx->base.screen), bo_sz, 0);
+
+                uintptr_t flags = PAN_BO_ACCESS_PRIVATE |
+                                  PAN_BO_ACCESS_RW |
+                                  PAN_BO_ACCESS_VERTEX_TILER |
+                                  PAN_BO_ACCESS_FRAGMENT;
+
+                _mesa_hash_table_insert(batch->pool.bos, bo, (void *) flags);
 
                 if (sz < TRANSIENT_SLAB_SIZE) {
                         batch->pool.transient_bo = bo;



More information about the mesa-commit mailing list