C Specification

Windows memory handles compatible with Vulkan may also be created by non-Vulkan APIs using methods beyond the scope of this specification. To determine the correct parameters to use when importing such handles, call:

// Provided by VK_KHR_external_memory_win32
VkResult vkGetMemoryWin32HandlePropertiesKHR(
    VkDevice                                    device,
    VkExternalMemoryHandleTypeFlagBits          handleType,
    HANDLE                                      handle,
    VkMemoryWin32HandlePropertiesKHR*           pMemoryWin32HandleProperties);

Parameters

  • device is the logical device that will be importing handle.

  • handleType is the type of the handle handle.

  • handle is the handle which will be imported.

  • pMemoryWin32HandleProperties will return properties of handle.

Description

Valid Usage
  • VUID-vkGetMemoryWin32HandlePropertiesKHR-handle-00665
    handle must be an external memory handle created outside of the Vulkan API

  • VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-00666
    handleType must not be one of the handle types defined as opaque

Valid Usage (Implicit)
  • VUID-vkGetMemoryWin32HandlePropertiesKHR-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-parameter
    handleType must be a valid VkExternalMemoryHandleTypeFlagBits value

  • VUID-vkGetMemoryWin32HandlePropertiesKHR-pMemoryWin32HandleProperties-parameter
    pMemoryWin32HandleProperties must be a valid pointer to a VkMemoryWin32HandlePropertiesKHR 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

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-2020 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0