vkImportFenceWin32HandleKHR(3)

# vkImportFenceWin32HandleKHR(3) Manual Page

## Name

vkImportFenceWin32HandleKHR - Import a fence from a Windows HANDLE

Loading… please wait.

## C Specification

To import a fence payload from a Windows handle, call:

    // Provided by VK_KHR_external_fence_win32
    VkResult vkImportFenceWin32HandleKHR(
        VkDevice                                    device,
        const VkImportFenceWin32HandleInfoKHR*      pImportFenceWin32HandleInfo);

## Parameters

- `device` is the logical device that created the fence.

- `pImportFenceWin32HandleInfo` is a pointer to a VkImportFenceWin32HandleInfoKHR structure specifying the fence and import parameters.

## Description

Importing a fence payload from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release ownership using the `CloseHandle` system call when the handle is no longer needed.

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-vkImportFenceWin32HandleKHR-fence-04448
  `fence` must not be associated with any queue command that has not yet completed execution on that queue

Valid Usage (Implicit)

- VUID-vkImportFenceWin32HandleKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkImportFenceWin32HandleKHR-pImportFenceWin32HandleInfo-parameter
  `pImportFenceWin32HandleInfo` must be a valid pointer to a valid VkImportFenceWin32HandleInfoKHR structure

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_INVALID_EXTERNAL_HANDLE`

## See Also

VK_KHR_external_fence_win32, VkDevice, VkImportFenceWin32HandleInfoKHR

## 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 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0