Enum
VkExternalFenceHandleTypeFlagBits
Bitmask of valid external fence handle types
Bits which may be set in
- VkPhysicalDeviceExternalFenceInfo::
handleType - VkExternalFenceProperties::
exportFromImportedHandleTypes - VkExternalFenceProperties::
compatibleHandleTypes
indicate external fence handle types, and are:
typedef enum VkExternalFenceHandleTypeFlagBits {
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008,
// Provided by extensions
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT,
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT,
VK_EXTERNAL_FENCE_HANDLE_TYPE_SCI_SYNC_OBJ_BIT_NV = 0x00000010,
VK_EXTERNAL_FENCE_HANDLE_TYPE_SCI_SYNC_FENCE_BIT_NV = 0x00000020,
} VkExternalFenceHandleTypeFlagBits;
pub struct ExternalFenceHandleTypeFlagBits(u32);
impl ExternalFenceHandleTypeFlagBits {
pub const OPAQUE_FD: Self = 0x00000001;
pub const OPAQUE_WIN32: Self = 0x00000002;
pub const OPAQUE_WIN32_KMT: Self = 0x00000004;
pub const SYNC_FD: Self = 0x00000008;
pub const OPAQUE_FD_KHR: Self = Self::OPAQUE_FD;
pub const OPAQUE_WIN32_KHR: Self = Self::OPAQUE_WIN32;
pub const OPAQUE_WIN32_KMT_KHR: Self = Self::OPAQUE_WIN32_KMT;
pub const SYNC_FD_KHR: Self = Self::SYNC_FD;
pub const SCI_SYNC_OBJ_NV: Self = 0x00000010;
pub const SCI_SYNC_FENCE_NV: Self = 0x00000020;
}
#define VkExternalFenceHandleTypeFlagBitsKHR VkExternalFenceHandleTypeFlagBits
const ExternalFenceHandleTypeFlagBitsKHR: _ = vk::ExternalFenceHandleTypeFlagBits;
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BITspecifies a POSIX file descriptor handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the POSIX system callsdup,dup2,close, and the non-standard system calldup3. Additionally, it must be transportable over a socket using anSCM_RIGHTScontrol message. It owns a reference to the underlying synchronization primitive represented by its Vulkan fence object.VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BITspecifies an NT handle that has only limited valid usage outside of Vulkan and other compatible APIs. It must be compatible with the functionsDuplicateHandle,CloseHandle,CompareObjectHandles,GetHandleInformation, andSetHandleInformation. It owns a reference to the underlying synchronization primitive represented by its Vulkan fence object.VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BITspecifies a global share handle that has only limited valid usage outside of Vulkan and other compatible APIs. It is not compatible with any native APIs. It does not own a reference to the underlying synchronization primitive represented by its Vulkan fence object, and will therefore become invalid when all Vulkan fence objects associated with it are destroyed.VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BITspecifies a POSIX file descriptor handle to a Linux Sync File or Android Fence. It can be used with any native API accepting a valid sync file or fence as input. It owns a reference to the underlying synchronization primitive associated with the file descriptor. Implementations which support importing this handle type must accept any type of sync or fence FD supported by the native system they are running on.
Some external fence handle types can only be shared within the same underlying physical device and/or the same driver version, as defined in the following table:
| Handle type | VkPhysicalDeviceIDProperties::driverUUID | VkPhysicalDeviceIDProperties::deviceUUID |
|---|---|---|
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT | Must match | Must match |
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT | Must match | Must match |
VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Must match | Must match |
VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT | No restriction | No restriction |
Parent
VK_VERSION_1_1Type
Enum