Mesa (main): zink: use device-local heap for sparse backing allocations

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 12 01:02:58 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Jan  4 11:31:25 2022 -0500

zink: use device-local heap for sparse backing allocations

backing allocations are real allocations, so they shouldn't be initialized
as sparse containers

Fixes: 40fdb3212c3 ("zink: add a suballocator")

Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14394>

---

 src/gallium/drivers/zink/zink_bo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_bo.c b/src/gallium/drivers/zink/zink_bo.c
index 6623e99c82e..750c2a571e1 100644
--- a/src/gallium/drivers/zink/zink_bo.c
+++ b/src/gallium/drivers/zink/zink_bo.c
@@ -357,7 +357,7 @@ sparse_backing_alloc(struct zink_screen *screen, struct zink_bo *bo,
       size = MAX2(size, ZINK_SPARSE_BUFFER_PAGE_SIZE);
 
       buf = zink_bo_create(screen, size, ZINK_SPARSE_BUFFER_PAGE_SIZE,
-                           bo->base.placement, ZINK_ALLOC_NO_SUBALLOC, NULL);
+                           ZINK_HEAP_DEVICE_LOCAL, ZINK_ALLOC_NO_SUBALLOC, NULL);
       if (!buf) {
          FREE(best_backing->chunks);
          FREE(best_backing);



More information about the mesa-commit mailing list