Function Prototype
vkImportFenceFdKHR
Import a fence from a POSIX file descriptor
To import a fence payload from a POSIX file descriptor, call:
VkResult vkImportFenceFdKHR(
VkDevice device,
const VkImportFenceFdInfoKHR* pImportFenceFdInfo);
pub fn import_fence_fd_khr(
device: vk::Device,
p_import_fence_fd_info: *const vk::ImportFenceFdInfoKHR,
) -> vk::Result;
deviceis the logical device that created the fence.pImportFenceFdInfois a pointer to a VkImportFenceFdInfoKHR structure specifying the fence and import parameters.
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
VUID-vkImportFenceFdKHR-fence-01463
fence must not be associated with any queue command that has not
yet completed execution on that queue
Valid Usage (Implicit)
VUID-vkImportFenceFdKHR-device-parameter
device must be a valid VkDevice handle
VUID-vkImportFenceFdKHR-pImportFenceFdInfo-parameter
pImportFenceFdInfo must be a valid pointer to a valid VkImportFenceFdInfoKHR structure
Parent
VK_KHR_external_fence_fdType
Function Prototype
Return Values
VK_SUCCESS
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_INVALID_EXTERNAL_HANDLE
VK_ERROR_UNKNOWN
VK_ERROR_VALIDATION_FAILED