C Specification
POSIX file descriptor memory handles compatible with Vulkan may also be created by non-Vulkan APIs using methods beyond the scope of this specification. To determine the correct parameters to use when importing such handles, call:
// Provided by VK_KHR_external_memory_fd
VkResult vkGetMemoryFdPropertiesKHR(
VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
int fd,
VkMemoryFdPropertiesKHR* pMemoryFdProperties);
Parameters
-
deviceis the logical device that will be importingfd. -
handleTypeis a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handlefd. -
fdis the handle which will be imported. -
pMemoryFdPropertiesis a pointer to a VkMemoryFdPropertiesKHR structure in which the properties of the handlefdare returned.
Description
If
VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations
is VK_TRUE, vkGetMemoryFdPropertiesKHR must not return
VK_ERROR_OUT_OF_HOST_MEMORY.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.