|
|
@ -597,18 +597,22 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
|
|
|
graphics_queue = logical.GetQueue(graphics_family);
|
|
|
|
graphics_queue = logical.GetQueue(graphics_family);
|
|
|
|
present_queue = logical.GetQueue(present_family);
|
|
|
|
present_queue = logical.GetQueue(present_family);
|
|
|
|
|
|
|
|
|
|
|
|
const VmaVulkanFunctions functions = {
|
|
|
|
VmaVulkanFunctions functions{};
|
|
|
|
.vkGetInstanceProcAddr = dld.vkGetInstanceProcAddr,
|
|
|
|
functions.vkGetInstanceProcAddr = dld.vkGetInstanceProcAddr;
|
|
|
|
.vkGetDeviceProcAddr = dld.vkGetDeviceProcAddr,
|
|
|
|
functions.vkGetDeviceProcAddr = dld.vkGetDeviceProcAddr;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const VmaAllocatorCreateInfo allocator_info = {
|
|
|
|
const VmaAllocatorCreateInfo allocator_info = {
|
|
|
|
.flags = VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT,
|
|
|
|
.flags = VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT,
|
|
|
|
.physicalDevice = physical,
|
|
|
|
.physicalDevice = physical,
|
|
|
|
.device = *logical,
|
|
|
|
.device = *logical,
|
|
|
|
|
|
|
|
.preferredLargeHeapBlockSize = 0,
|
|
|
|
|
|
|
|
.pAllocationCallbacks = nullptr,
|
|
|
|
|
|
|
|
.pDeviceMemoryCallbacks = nullptr,
|
|
|
|
|
|
|
|
.pHeapSizeLimit = nullptr,
|
|
|
|
.pVulkanFunctions = &functions,
|
|
|
|
.pVulkanFunctions = &functions,
|
|
|
|
.instance = instance,
|
|
|
|
.instance = instance,
|
|
|
|
.vulkanApiVersion = VK_API_VERSION_1_1,
|
|
|
|
.vulkanApiVersion = VK_API_VERSION_1_1,
|
|
|
|
|
|
|
|
.pTypeExternalMemoryHandleTypes = nullptr,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
vk::Check(vmaCreateAllocator(&allocator_info, &allocator));
|
|
|
|
vk::Check(vmaCreateAllocator(&allocator_info, &allocator));
|
|
|
|