VkImportSemaphoreFdInfoKHR(3)

# VkImportSemaphoreFdInfoKHR(3) Manual Page

## Name

VkImportSemaphoreFdInfoKHR - Structure specifying POSIX file descriptor to import to a semaphore

## C Specification

The `VkImportSemaphoreFdInfoKHR` structure is defined as:

    typedef struct VkImportSemaphoreFdInfoKHR {
        VkStructureType                          sType;
        const void*                              pNext;
        VkSemaphore                              semaphore;
        VkSemaphoreImportFlags                   flags;
        VkExternalSemaphoreHandleTypeFlagBits    handleType;
        int                                      fd;
    } VkImportSemaphoreFdInfoKHR;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `semaphore` is the semaphore into which the payload will be imported.

- `flags` is a bitmask of VkSemaphoreImportFlagBits specifying additional parameters for the semaphore payload import operation.

- `handleType` specifies the type of `fd`.

- `fd` is the external handle to import.

## Description

The handle types supported by `handleType` are:

Table 1. Handle Types Supported by VkImportSemaphoreFdInfoKHR
Handle Type | Transference | Permanence Supported
--- | --- | ---
`VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT` | Reference | Temporary,Permanent
`VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT` | Copy | Temporary

Valid Usage

- `handleType` must be a value included in the Handle Types Supported by VkImportSemaphoreFdInfoKHR table.

- `fd` must obey any requirements listed for `handleType` in external semaphore handle types compatibility.

- If `handleType` is `VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT`, the VkSemaphoreCreateInfo::`flags` field must match that of the semaphore from which `fd` was exported.

- If `handleType` is `VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT`, the VkSemaphoreTypeCreateInfo::`semaphoreType` field must match that of the semaphore from which `fd` was exported.

- If `flags` contains `VK_SEMAPHORE_IMPORT_TEMPORARY_BIT`, the VkSemaphoreTypeCreateInfo::`semaphoreType` field of the semaphore from which `fd` was exported must not be `VK_SEMAPHORE_TYPE_TIMELINE`.

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR`

- `pNext` must be `NULL`

- `semaphore` must be a valid VkSemaphore handle

- `flags` must be a valid combination of VkSemaphoreImportFlagBits values

- `handleType` must be a valid VkExternalSemaphoreHandleTypeFlagBits value

Host Synchronization

- Host access to `semaphore` must be externally synchronized

## See Also

VkExternalSemaphoreHandleTypeFlagBits, VkSemaphore, VkSemaphoreImportFlags, VkStructureType, vkImportSemaphoreFdKHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.