C Specification

The VkImportSemaphoreWin32HandleInfoKHR structure is defined as:

typedef struct VkImportSemaphoreWin32HandleInfoKHR {
    VkStructureType                          sType;
    const void*                              pNext;
    VkSemaphore                              semaphore;
    VkSemaphoreImportFlags                   flags;
    VkExternalSemaphoreHandleTypeFlagBits    handleType;
    HANDLE                                   handle;
    LPCWSTR                                  name;
} VkImportSemaphoreWin32HandleInfoKHR;

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 handle.

  • handle is the external handle to import, or NULL.

  • name is a null-terminated UTF-16 string naming the underlying synchronization primitive to import, or NULL.

Description

The handle types supported by handleType are:

Table 1. Handle Types Supported by VkImportSemaphoreWin32HandleInfoKHR
Handle Type Transference Permanence Supported

VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT

Reference

Temporary,Permanent

VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT

Reference

Temporary,Permanent

VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT

Reference

Temporary,Permanent

Valid Usage
  • handleType must be a value included in the Handle Types Supported by VkImportSemaphoreWin32HandleInfoKHR table.

  • If handleType is not VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, name must be NULL.

  • If handleType is not 0 and handle is NULL, name must name a valid synchronization primitive of the type specified by handleType.

  • If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.

  • If handle is not NULL, name must be NULL.

  • If handle is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility.

  • If name is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility.

  • If handleType is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, the VkSemaphoreCreateInfo::flags field must match that of the semaphore from which handle or name was exported.

  • If handleType is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, the VkSemaphoreTypeCreateInfoKHR::semaphoreType field must match that of the semaphore from which handle or name was exported.

  • If flags contains VK_SEMAPHORE_IMPORT_TEMPORARY_BIT, the VkSemaphoreTypeCreateInfoKHR::semaphoreType field of the semaphore from which handle or name was exported must not be VK_SEMAPHORE_TYPE_TIMELINE_KHR.

Valid Usage (Implicit)
Host Synchronization
  • Host access to semaphore must be externally synchronized

See Also

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 (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.