Mesa (main): anv: Align buffer VMA to 2MiB for XeHP

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 13 22:45:07 UTC 2021


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

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Wed Dec  9 14:24:14 2020 -0800

anv: Align buffer VMA to 2MiB for XeHP

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14155>

---

 src/intel/vulkan/anv_allocator.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 7a87175cc7f..f4e03286383 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -1626,6 +1626,12 @@ anv_bo_vma_alloc_or_close(struct anv_device *device,
    if (device->info.ver >= 12 && (alloc_flags & ANV_BO_ALLOC_IMPLICIT_CCS))
       align = 64 * 1024;
 
+   /* For XeHP, lmem and smem cannot share a single PDE, which means they
+    * can't live in the same 2MiB aligned region.
+    */
+   if (device->info.verx10 >= 125)
+       align = 2 * 1024 * 1024;
+
    if (alloc_flags & ANV_BO_ALLOC_FIXED_ADDRESS) {
       bo->has_fixed_address = true;
       bo->offset = explicit_address;



More information about the mesa-commit mailing list