From db4488a2dcabe5993c64135965e6477e75b5b92b Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 11 Oct 2018 16:38:31 -0500 Subject: [PATCH] anv: Align memory VA to support for Ys, Tile64 tiled images Reviewed-by: Lionel Landwerlin Reviewed-by: Nanley Chery Part-of: --- src/intel/vulkan/anv_allocator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 9013446..34ffe05 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1405,6 +1405,10 @@ anv_bo_vma_alloc_or_close(struct anv_device *device, uint32_t align = device->physical->info.mem_alignment; + /* If it's big enough to store a tiled resource, we need 64K alignment */ + if (bo->size >= 64 * 1024) + align = MAX2(64 * 1024, align); + /* If we're using the AUX map, make sure we follow the required * alignment. */ -- 2.7.4