diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 013d5bf1913..cb1f77e1a43 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1551,9 +1551,18 @@ anv_bo_vma_calc_alignment_requirement(struct anv_device *device, const bool is_small_heap = anv_bo_is_small_heap(alloc_flags); uint32_t align = 64; /* A cache line */ - /* If it's big enough to store a tiled resource, we need 64K alignment */ - if (size >= 64 * 1024 && !is_small_heap) - align = MAX2(64 * 1024, align); + /* If it's big enough to store a 64K tiled resource, we need 64K alignment. + * Wa_22015614752 requires that some images be aligned to 64k when used on + * multiple engines, so allocation that might contain 4k tiled images need + * to be aligned to 64k. + */ + const uint64_t image_alignment = + (size >= 64 * 1024 || + (device->queue_count > 1 && + intel_needs_workaround(device->info, 22015614752))) ? + 64 * 1024 : 4 * 1024; + if (size >= 4 * 1024 && !is_small_heap) + align = MAX2(image_alignment, align); /* If we're using the AUX map, make sure we follow the required * alignment. diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index d4db8212ce4..f536a0d4a9d 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -2969,6 +2969,9 @@ anv_image_bind_address(struct anv_device *device, enum anv_image_memory_binding binding, struct anv_address address) { + assert(anv_address_physical(address) % + image->bindings[binding].memory_range.alignment == 0); + image->bindings[binding].address = address; /* Map bindings for images with host transfer usage, so that we don't have