Support VK_KHR_dedicated_allocation in Vulkan allocator
While working on the Vulkan renderer this came to mind.
Per the specification:
-
requiresDedicatedAllocation may be VK_TRUE if the pNext chain of VkImageCreateInfo for the call to vkCreateImage used to create the image being queried included a VkExternalMemoryImageCreateInfo structure, and any of the handle types specified in VkExternalMemoryImageCreateInfo::handleTypes requires dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2 in VkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures.
-
requiresDedicatedAllocation may be VK_TRUE if the image’s tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.
Since the Vulkan allocator creates images with a drm tiling and images that are exportable this is worth considering.
There are also benefits to considering the prefersDedicatedAllocation suggestion since the driver may be able to allocate with a more optimal memory type.
In the case of the allocator I would not consider this to be mandatory extension.
Further info: more than 90% of Vulkan implementations on Linux support dedicated allocations, so requiring dedicated allocations would be fine.