Class KHRExternalFenceFd
- Name String
VK_KHR_external_fence_fd- Extension Type
- Device extension
- Registered Extension Number
- 116
- Revision
- 1
- Extension and Version Dependencies
VK_KHR_external_fenceor Version 1.1- Contact
- Jesse Hall critsec
Other Extension Metadata
- Last Modified Date
- 2017-05-08
- IP Status
- No known IP claims.
- Contributors
- Jesse Hall, Google
- James Jones, NVIDIA
- Jeff Juliano, NVIDIA
- Cass Everitt, Oculus
- Contributors to
VK_KHR_external_semaphore_fd
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnvkGetFenceFdKHR(org.lwjgl.vulkan.VkDevice device, long pGetFdInfo, long pFd) Unsafe version of:GetFenceFdKHRstatic intnvkImportFenceFdKHR(org.lwjgl.vulkan.VkDevice device, long pImportFenceFdInfo) Unsafe version of:ImportFenceFdKHRstatic intvkGetFenceFdKHR(org.lwjgl.vulkan.VkDevice device, VkFenceGetFdInfoKHR pGetFdInfo, int[] pFd) Array version of:GetFenceFdKHRstatic intvkGetFenceFdKHR(org.lwjgl.vulkan.VkDevice device, VkFenceGetFdInfoKHR pGetFdInfo, IntBuffer pFd) Get a POSIX file descriptor handle for a fence.static intvkImportFenceFdKHR(org.lwjgl.vulkan.VkDevice device, VkImportFenceFdInfoKHR pImportFenceFdInfo) Import a fence from a POSIX file descriptor.
-
Field Details
-
VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION
public static final int VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR
public static final int VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHRExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR
public static final int VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHRExtendsVkStructureType.Enum values:
- See Also:
-
-
Method Details
-
nvkImportFenceFdKHR
public static int nvkImportFenceFdKHR(org.lwjgl.vulkan.VkDevice device, long pImportFenceFdInfo) Unsafe version of:ImportFenceFdKHR -
vkImportFenceFdKHR
public static int vkImportFenceFdKHR(org.lwjgl.vulkan.VkDevice device, VkImportFenceFdInfoKHR pImportFenceFdInfo) Import a fence from a POSIX file descriptor.C Specification
To import a fence payload from a POSIX file descriptor, call:
VkResult vkImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo);Description
Importing a fence payload from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import.
Applications can import the same fence payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.
Valid Usage
fencemust not be associated with any queue command that has not yet completed execution on that queue
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepImportFenceFdInfomust be a valid pointer to a validVkImportFenceFdInfoKHRstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that created the fence.pImportFenceFdInfo- a pointer to aVkImportFenceFdInfoKHRstructure specifying the fence and import parameters.
-
nvkGetFenceFdKHR
public static int nvkGetFenceFdKHR(org.lwjgl.vulkan.VkDevice device, long pGetFdInfo, long pFd) Unsafe version of:GetFenceFdKHR -
vkGetFenceFdKHR
public static int vkGetFenceFdKHR(org.lwjgl.vulkan.VkDevice device, VkFenceGetFdInfoKHR pGetFdInfo, IntBuffer pFd) Get a POSIX file descriptor handle for a fence.C Specification
To export a POSIX file descriptor representing the payload of a fence, call:
VkResult vkGetFenceFdKHR( VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd);Description
Each call to
vkGetFenceFdKHRmust create a new file descriptor and transfer ownership of it to the application. To avoid leaking resources, the application must release ownership of the file descriptor when it is no longer needed.Note
Ownership can be released in many ways. For example, the application can call
close() on the file descriptor, or transfer ownership back to Vulkan by using the file descriptor to import a fence payload.If
pGetFdInfo→handleTypeisEXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BITand the fence is signaled at the timevkGetFenceFdKHRis called,pFdmay return the value-1instead of a valid file descriptor.Where supported by the operating system, the implementation must set the file descriptor to be closed automatically when an
execvesystem call is made.Exporting a file descriptor from a fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence State.
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepGetFdInfomust be a valid pointer to a validVkFenceGetFdInfoKHRstructurepFdmust 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 fence being exported.pGetFdInfo- a pointer to aVkFenceGetFdInfoKHRstructure containing parameters of the export operation.pFd- will return the file descriptor representing the fence payload.
-
vkGetFenceFdKHR
public static int vkGetFenceFdKHR(org.lwjgl.vulkan.VkDevice device, VkFenceGetFdInfoKHR pGetFdInfo, int[] pFd) Array version of:GetFenceFdKHR
-