public class KHRExternalSemaphoreFd
extends java.lang.Object
VK_KHR_external_semaphore_fdVK_KHR_external_semaphore| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME
The extension name.
|
static int |
VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION
The extension specification version.
|
static int |
VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR
Extends
VkStructureType. |
| Modifier and Type | Method and Description |
|---|---|
static int |
nvkGetSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
long pGetFdInfo,
long pFd)
Unsafe version of:
GetSemaphoreFdKHR |
static int |
nvkImportSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
long pImportSemaphoreFdInfo)
Unsafe version of:
ImportSemaphoreFdKHR |
static int |
vkGetSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
VkSemaphoreGetFdInfoKHR pGetFdInfo,
int[] pFd)
Array version of:
GetSemaphoreFdKHR |
static int |
vkGetSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
VkSemaphoreGetFdInfoKHR pGetFdInfo,
java.nio.IntBuffer pFd)
Get a POSIX file descriptor handle for a semaphore.
|
static int |
vkImportSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
VkImportSemaphoreFdInfoKHR pImportSemaphoreFdInfo)
Import a semaphore from a POSIX file descriptor.
|
public static final int VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION
public static final java.lang.String VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME
public static final int VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR
VkStructureType.
public static int nvkImportSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
long pImportSemaphoreFdInfo)
ImportSemaphoreFdKHRpublic static int vkImportSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
VkImportSemaphoreFdInfoKHR pImportSemaphoreFdInfo)
To import a semaphore payload from a POSIX file descriptor, call:
VkResult vkImportSemaphoreFdKHR(
VkDevice device,
const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
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.
semaphore must not be associated with any queue command that has not yet completed execution on that queuedevice must be a valid VkDevice handlepImportSemaphoreFdInfo must be a valid pointer to a valid VkImportSemaphoreFdInfoKHR structuredevice - the logical device that created the semaphore.pImportSemaphoreFdInfo - a pointer to a VkImportSemaphoreFdInfoKHR structure specifying the semaphore and import parameters.public static int nvkGetSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
long pGetFdInfo,
long pFd)
GetSemaphoreFdKHRpublic static int vkGetSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
VkSemaphoreGetFdInfoKHR pGetFdInfo,
java.nio.IntBuffer pFd)
To export a POSIX file descriptor representing the payload of a semaphore, call:
VkResult vkGetSemaphoreFdKHR(
VkDevice device,
const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
int* pFd);
Each call to vkGetSemaphoreFdKHR must 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.
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 execve system 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.
device must be a valid VkDevice handlepGetFdInfo must be a valid pointer to a valid VkSemaphoreGetFdInfoKHR structurepFd must be a valid pointer to an int valuedevice - the logical device that created the semaphore being exported.pGetFdInfo - a pointer to a VkSemaphoreGetFdInfoKHR structure containing parameters of the export operation.pFd - will return the file descriptor representing the semaphore payload.public static int vkGetSemaphoreFdKHR(org.lwjgl.vulkan.VkDevice device,
VkSemaphoreGetFdInfoKHR pGetFdInfo,
int[] pFd)
GetSemaphoreFdKHRCopyright LWJGL. All Rights Reserved. License terms.