Mesa (staging/21.3): zink: set suballocator bo size to aligned allocation size

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 18 19:01:41 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: fdf2f6fa033cfa0b3b441169a33512bb22ecaf87
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fdf2f6fa033cfa0b3b441169a33512bb22ecaf87

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Nov 16 17:19:43 2021 -0500

zink: set suballocator bo size to aligned allocation size

this is the actual memory size

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13824>
(cherry picked from commit 97b92c9c32a508b9aa85458661b762ffde1c590a)

---

 .pick_status.json                  | 2 +-
 src/gallium/drivers/zink/zink_bo.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 5fef7c12160..d418b055542 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -580,7 +580,7 @@
         "description": "zink: set suballocator bo size to aligned allocation size",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_bo.c b/src/gallium/drivers/zink/zink_bo.c
index b5c815de033..cf93a2e1e13 100644
--- a/src/gallium/drivers/zink/zink_bo.c
+++ b/src/gallium/drivers/zink/zink_bo.c
@@ -278,7 +278,7 @@ bo_create_internal(struct zink_screen *screen,
    simple_mtx_init(&bo->lock, mtx_plain);
    pipe_reference_init(&bo->base.reference, 1);
    bo->base.alignment_log2 = util_logbase2(alignment);
-   bo->base.size = size;
+   bo->base.size = mai.allocationSize;
    bo->base.vtbl = &bo_vtbl;
    bo->base.placement = vk_domain_from_heap(heap);
    bo->base.usage = flags;



More information about the mesa-commit mailing list