}
device->memory.heap_count = 1;
- device->memory.heaps[0] = (VkMemoryHeap) {
+ device->memory.heaps[0] = (struct anv_memory_heap) {
.size = heap_size,
.flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT,
+ .supports_48bit_addresses = device->supports_48bit_addresses,
};
return VK_SUCCESS;
goto fail;
}
- if (pdevice->supports_48bit_addresses)
+ assert(mem->type->heapIndex < pdevice->memory.heap_count);
+ if (pdevice->memory.heaps[mem->type->heapIndex].supports_48bit_addresses)
mem->bo->flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
if (pdevice->has_exec_async)
VkBufferUsageFlags valid_buffer_usage;
};
+struct anv_memory_heap {
+ /* Standard bits passed on to the client */
+ VkDeviceSize size;
+ VkMemoryHeapFlags flags;
+
+ /* Driver-internal book-keeping */
+ bool supports_48bit_addresses;
+};
+
struct anv_physical_device {
VK_LOADER_DATA _loader_data;
uint32_t type_count;
struct anv_memory_type types[VK_MAX_MEMORY_TYPES];
uint32_t heap_count;
- VkMemoryHeap heaps[VK_MAX_MEMORY_HEAPS];
+ struct anv_memory_heap heaps[VK_MAX_MEMORY_HEAPS];
} memory;
uint8_t pipeline_cache_uuid[VK_UUID_SIZE];