{
VkResult result;
+ if (device->info.verx10 >= 125) {
+ /* Make sure VMA addresses are 2MiB aligned for the block pool */
+ assert(anv_is_aligned(start_address, 2 * 1024 * 1024));
+ assert(anv_is_aligned(initial_size, 2 * 1024 * 1024));
+ }
+
pool->name = name;
pool->device = device;
pool->use_relocations = anv_use_relocations(device->physical);
/* We don't want to ever see signed overflow */
assert(start_offset < INT32_MAX - (int32_t)BLOCK_POOL_MEMFD_SIZE);
+ uint32_t initial_size = block_size * 16;
+ if (device->info.verx10 >= 125)
+ initial_size = MAX2(initial_size, 2 * 1024 * 1024);
+
VkResult result = anv_block_pool_init(&pool->block_pool, device, name,
base_address + start_offset,
- block_size * 16);
+ initial_size);
if (result != VK_SUCCESS)
return result;