VkMemoryGetFdInfoKHR
The VkMemoryGetFdInfoKHR structure is defined as:
typedef struct VkMemoryGetFdInfoKHR {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetFdInfoKHR;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.memoryis the memory object from which the handle will be exported.handleTypeis a VkExternalMemoryHandleTypeFlagBits value specifying the type of handle requested.
The properties of the file descriptor exported depend on the value of
handleType.
See VkExternalMemoryHandleTypeFlagBits for a description of the
properties of the defined external memory handle types.
The size of the exported file may be larger than the size requested by
VkMemoryAllocateInfo::allocationSize.
If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
then the application can query the file’s actual size with
lseek.
Valid Usage
VUID-VkMemoryGetFdInfoKHR-handleType-00671
handleType must have been included in
VkExportMemoryAllocateInfo::handleTypes when memory
was created
VUID-VkMemoryGetFdInfoKHR-handleType-00672
handleType must be
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT or
VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT
Valid Usage (Implicit)
VUID-VkMemoryGetFdInfoKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR
VUID-VkMemoryGetFdInfoKHR-pNext-pNext
pNext must be NULL
VUID-VkMemoryGetFdInfoKHR-memory-parameter
memory must be a valid VkDeviceMemory handle
VUID-VkMemoryGetFdInfoKHR-handleType-parameter
handleType must be a valid VkExternalMemoryHandleTypeFlagBits value