VkImportFenceFdInfoKHR
The VkImportFenceFdInfoKHR structure is defined as:
typedef struct VkImportFenceFdInfoKHR {
VkStructureType sType;
const void* pNext;
VkFence fence;
VkFenceImportFlags flags;
VkExternalFenceHandleTypeFlagBits handleType;
int fd;
} VkImportFenceFdInfoKHR;
pub struct ImportFenceFdInfoKHR {
s_type: vk::StructureType,
p_next: *const c_void,
fence: vk::Fence,
flags: vk::FenceImportFlags,
handle_type: vk::ExternalFenceHandleTypeFlagBits,
fd: i32,
}
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.fenceis the fence into which the payload will be imported.flagsis a bitmask of VkFenceImportFlagBits specifying additional parameters for the fence payload import operation.handleTypeis a VkExternalFenceHandleTypeFlagBits value specifying the type offd.fdis the external handle to import.
The handle types supported by handleType are:
| Handle Type | Transference | Permanence Supported |
|---|---|---|
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT | Reference | Temporary,Permanent |
VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT | Copy | Temporary |
Valid Usage
VUID-VkImportFenceFdInfoKHR-handleType-01464
handleType must be a value included in the
Handle Types Supported by
VkImportFenceFdInfoKHR table
VUID-VkImportFenceFdInfoKHR-fd-01541
fd must obey any requirements listed for handleType in
external fence handle types
compatibility
VUID-VkImportFenceFdInfoKHR-handleType-07306
If handleType refers to a handle type with copy payload
transference semantics, flags must contain
VK_FENCE_IMPORT_TEMPORARY_BIT
If handleType is VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT, the
special value -1 for fd is treated like a valid sync file descriptor
referring to an object that has already signaled.
The import operation will succeed and the VkFence will have a
temporarily imported payload as if a valid file descriptor had been
provided.
-1 file
descriptor when exporting a VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT
from a VkFence which is signaled.Valid Usage (Implicit)
VUID-VkImportFenceFdInfoKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR
VUID-VkImportFenceFdInfoKHR-pNext-pNext
pNext must be NULL
VUID-VkImportFenceFdInfoKHR-fence-parameter
fence must be a valid VkFence handle
VUID-VkImportFenceFdInfoKHR-flags-parameter
flags must be a valid combination of VkFenceImportFlagBits values
VUID-VkImportFenceFdInfoKHR-handleType-parameter
handleType must be a valid VkExternalFenceHandleTypeFlagBits value
Host Synchronization
- Host access to
fencemust be externally synchronized