14 uint32_t vulkan_api_version,
16 VkPhysicalDevice physicalDevice,
19 bool mustUseCoherentHostVisibleMemory) {
20#define PROVIDE_PROC(tbl, proc, provider) tbl.vk##proc = provider->proc;
22 VmaVulkanFunctions proc_table = {};
23 proc_table.vkGetInstanceProcAddr = vk->NativeGetInstanceProcAddr();
25 PROVIDE_PROC(proc_table, GetPhysicalDeviceProperties, vk);
26 PROVIDE_PROC(proc_table, GetPhysicalDeviceMemoryProperties, vk);
32 PROVIDE_PROC(proc_table, InvalidateMappedMemoryRanges, vk);
35 PROVIDE_PROC(proc_table, GetBufferMemoryRequirements, vk);
36 PROVIDE_PROC(proc_table, GetImageMemoryRequirements, vk);
43#define PROVIDE_PROC_COALESCE(tbl, proc, provider) \
44 tbl.vk##proc##KHR = provider->proc ? provider->proc : provider->proc##KHR;
53#undef PROVIDE_PROC_COALESCE
57 VmaAllocatorCreateInfo allocator_info = {};
58 allocator_info.vulkanApiVersion = vulkan_api_version;
59 allocator_info.physicalDevice = physicalDevice;
60 allocator_info.device =
device;
62 allocator_info.pVulkanFunctions = &proc_table;
64 VmaAllocator allocator;
65 vmaCreateAllocator(&allocator_info, &allocator);
69 mustUseCoherentHostVisibleMemory));
static void usage(char *argv0)