MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / InitVMA

Function InitVMA

tests/loadtests/vkloadtests/VulkanLoadTestSample.cpp:48–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 VkPhysicalDeviceMemoryProperties cachedDevMemProps;
47
48 void InitVMA(VkPhysicalDevice& physicalDevice, VkDevice& device, VkInstance& instance,
49 VkPhysicalDeviceMemoryProperties& devMemProps)
50 {
51 cachedDevMemProps = devMemProps;
52
53 VmaVulkanFunctions vulkanFunctions = {};
54 vulkanFunctions.vkGetInstanceProcAddr = &vkGetInstanceProcAddr;
55 vulkanFunctions.vkGetDeviceProcAddr = &vkGetDeviceProcAddr;
56
57 VmaAllocatorCreateInfo allocatorCreateInfo = {};
58 allocatorCreateInfo.vulkanApiVersion = VK_API_VERSION_1_0;
59 allocatorCreateInfo.physicalDevice = physicalDevice;
60 allocatorCreateInfo.device = device;
61 allocatorCreateInfo.instance = instance;
62 allocatorCreateInfo.pVulkanFunctions = &vulkanFunctions;
63
64 vmaCreateAllocator(&allocatorCreateInfo, &vmaAllocator);
65 }
66
67 void DestroyVMA()
68 {

Callers 1

TextureMethod · 0.85

Calls 1

vmaCreateAllocatorFunction · 0.85

Tested by

no test coverage detected