Class KHRExternalSemaphoreFd
- java.lang.Object
-
- org.lwjgl.vulkan.KHRExternalSemaphoreFd
-
public class KHRExternalSemaphoreFd extends java.lang.ObjectAn application using external memory may wish to synchronize access to that memory using semaphores. This extension enables an application to export semaphore payload to and import semaphore payload from POSIX file descriptors.- Name String
VK_KHR_external_semaphore_fd- Extension Type
- Device extension
- Registered Extension Number
- 80
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_external_semaphore
- Contact
- James Jones cubanismo
- Last Modified Date
- 2016-10-21
- IP Status
- No known IP claims.
- Contributors
- Jesse Hall, Google
- James Jones, NVIDIA
- Jeff Juliano, NVIDIA
- Carsten Rohde, NVIDIA
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringVK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAMEThe extension name.static intVK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSIONThe extension specification version.static intVK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR
VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHRExtendsVkStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnvkGetSemaphoreFdKHR(VkDevice device, long pGetFdInfo, long pFd)Unsafe version of:GetSemaphoreFdKHRstatic intnvkImportSemaphoreFdKHR(VkDevice device, long pImportSemaphoreFdInfo)Unsafe version of:ImportSemaphoreFdKHRstatic intvkGetSemaphoreFdKHR(VkDevice device, VkSemaphoreGetFdInfoKHR pGetFdInfo, int[] pFd)Array version of:GetSemaphoreFdKHRstatic intvkGetSemaphoreFdKHR(VkDevice device, VkSemaphoreGetFdInfoKHR pGetFdInfo, java.nio.IntBuffer pFd)Get a POSIX file descriptor handle for a semaphore.static intvkImportSemaphoreFdKHR(VkDevice device, VkImportSemaphoreFdInfoKHR pImportSemaphoreFdInfo)Import a semaphore from a POSIX file descriptor.
-
-
-
Field Detail
-
VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION
The extension specification version.
-
VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME
The extension name.
-
-
Method Detail
-
nvkImportSemaphoreFdKHR
public static int nvkImportSemaphoreFdKHR(VkDevice device, long pImportSemaphoreFdInfo)
Unsafe version of:ImportSemaphoreFdKHR
-
vkImportSemaphoreFdKHR
public static int vkImportSemaphoreFdKHR(VkDevice device, VkImportSemaphoreFdInfoKHR pImportSemaphoreFdInfo)
Import a semaphore from a POSIX file descriptor.C Specification
To import a semaphore payload from a POSIX file descriptor, call:
VkResult vkImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);Description
Importing a semaphore 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 semaphore 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
semaphoremust not be associated with any queue command that has not yet completed execution on that queue
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepImportSemaphoreFdInfomust be a valid pointer to a validVkImportSemaphoreFdInfoKHRstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that created the semaphore.pImportSemaphoreFdInfo- points to aVkImportSemaphoreFdInfoKHRstructure specifying the semaphore and import parameters.
-
nvkGetSemaphoreFdKHR
public static int nvkGetSemaphoreFdKHR(VkDevice device, long pGetFdInfo, long pFd)
Unsafe version of:GetSemaphoreFdKHR
-
vkGetSemaphoreFdKHR
public static int vkGetSemaphoreFdKHR(VkDevice device, VkSemaphoreGetFdInfoKHR pGetFdInfo, java.nio.IntBuffer pFd)
Get a POSIX file descriptor handle for a semaphore.C Specification
To export a POSIX file descriptor representing the payload of a semaphore, call:
VkResult vkGetSemaphoreFdKHR( VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd);Description
Each call to
vkGetSemaphoreFdKHRmust 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 semaphore payload.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 semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore State.
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepGetFdInfomust be a valid pointer to a validVkSemaphoreGetFdInfoKHRstructurepFdmust 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 semaphore being exported.pGetFdInfo- a pointer to an instance of theVkSemaphoreGetFdInfoKHRstructure containing parameters of the export operation.pFd- will return the file descriptor representing the semaphore payload.
-
vkGetSemaphoreFdKHR
public static int vkGetSemaphoreFdKHR(VkDevice device, VkSemaphoreGetFdInfoKHR pGetFdInfo, int[] pFd)
Array version of:GetSemaphoreFdKHR
-
-