Class KHRExternalMemoryFd
- Name String
VK_KHR_external_memory_fd- Extension Type
- Device extension
- Registered Extension Number
- 75
- Revision
- 1
- Extension and Version Dependencies
VK_KHR_external_memoryor Version 1.1- Contact
- James Jones cubanismo
Other Extension Metadata
- Last Modified Date
- 2016-10-21
- IP Status
- No known IP claims.
- Contributors
- James Jones, NVIDIA
- Jeff Juliano, NVIDIA
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnvkGetMemoryFdKHR(org.lwjgl.vulkan.VkDevice device, long pGetFdInfo, long pFd) Unsafe version of:GetMemoryFdKHRstatic intnvkGetMemoryFdPropertiesKHR(org.lwjgl.vulkan.VkDevice device, int handleType, int fd, long pMemoryFdProperties) Unsafe version of:GetMemoryFdPropertiesKHRstatic intvkGetMemoryFdKHR(org.lwjgl.vulkan.VkDevice device, VkMemoryGetFdInfoKHR pGetFdInfo, int[] pFd) Array version of:GetMemoryFdKHRstatic intvkGetMemoryFdKHR(org.lwjgl.vulkan.VkDevice device, VkMemoryGetFdInfoKHR pGetFdInfo, IntBuffer pFd) Get a POSIX file descriptor for a memory object.static intvkGetMemoryFdPropertiesKHR(org.lwjgl.vulkan.VkDevice device, int handleType, int fd, VkMemoryFdPropertiesKHR pMemoryFdProperties) Get Properties of External Memory File Descriptors.
-
Field Details
-
VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION
public static final int VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR
public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHRExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR
public static final int VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHRExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR
public static final int VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHRExtendsVkStructureType.Enum values:
- See Also:
-
-
Method Details
-
nvkGetMemoryFdKHR
public static int nvkGetMemoryFdKHR(org.lwjgl.vulkan.VkDevice device, long pGetFdInfo, long pFd) Unsafe version of:GetMemoryFdKHR -
vkGetMemoryFdKHR
public static int vkGetMemoryFdKHR(org.lwjgl.vulkan.VkDevice device, VkMemoryGetFdInfoKHR pGetFdInfo, IntBuffer pFd) Get a POSIX file descriptor for a memory object.C Specification
To export a POSIX file descriptor referencing the payload of a Vulkan device memory object, call:
VkResult vkGetMemoryFdKHR( VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd);Description
Each call to
vkGetMemoryFdKHRmust create a new file descriptor holding a reference to the memory object’s payload and transfer ownership of the file descriptor to the application. To avoid leaking resources, the application must release ownership of the file descriptor using theclosesystem call when it is no longer needed, or by importing a Vulkan memory object from it. Where supported by the operating system, the implementation must set the file descriptor to be closed automatically when anexecvesystem call is made.Valid Usage (Implicit)
devicemust be a validVkDevicehandlepGetFdInfomust be a valid pointer to a validVkMemoryGetFdInfoKHRstructurepFdmust be a valid pointer to anintvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that created the device memory being exported.pGetFdInfo- a pointer to aVkMemoryGetFdInfoKHRstructure containing parameters of the export operation.pFd- will return a file descriptor referencing the payload of the device memory object.
-
nvkGetMemoryFdPropertiesKHR
public static int nvkGetMemoryFdPropertiesKHR(org.lwjgl.vulkan.VkDevice device, int handleType, int fd, long pMemoryFdProperties) Unsafe version of:GetMemoryFdPropertiesKHR -
vkGetMemoryFdPropertiesKHR
public static int vkGetMemoryFdPropertiesKHR(org.lwjgl.vulkan.VkDevice device, int handleType, int fd, VkMemoryFdPropertiesKHR pMemoryFdProperties) Get Properties of External Memory File Descriptors.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:
VkResult vkGetMemoryFdPropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties);Valid Usage
fdmust point to a valid POSIX file descriptor memory handlehandleTypemust not beEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT
Valid Usage (Implicit)
devicemust be a validVkDevicehandlehandleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvaluepMemoryFdPropertiesmust be a valid pointer to aVkMemoryFdPropertiesKHRstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that will be importingfd.handleType- aVkExternalMemoryHandleTypeFlagBitsvalue specifying the type of the handlefd.fd- the handle which will be imported.pMemoryFdProperties- a pointer to aVkMemoryFdPropertiesKHRstructure in which the properties of the handlefdare returned.
-
vkGetMemoryFdKHR
public static int vkGetMemoryFdKHR(org.lwjgl.vulkan.VkDevice device, VkMemoryGetFdInfoKHR pGetFdInfo, int[] pFd) Array version of:GetMemoryFdKHR
-