Function Prototype

vkImportSemaphoreFdKHR

Import a semaphore from a POSIX file descriptor

To import a semaphore payload from a POSIX file descriptor, call:

VkResult vkImportSemaphoreFdKHR(
    VkDevice device,
    const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
  • device is the logical device that created the semaphore.
  • pImportSemaphoreFdInfo is a pointer to a VkImportSemaphoreFdInfoKHR structure specifying the semaphore and import parameters.

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

VUID-vkImportSemaphoreFdKHR-semaphore-01142

semaphore must not be associated with any queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

VUID-vkImportSemaphoreFdKHR-pImportSemaphoreFdInfo-parameter

pImportSemaphoreFdInfo must be a valid pointer to a valid VkImportSemaphoreFdInfoKHR structure