C Specification
To import memory from a Windows handle, add a
VkImportMemoryWin32HandleInfoKHR structure to the pNext chain of
the VkMemoryAllocateInfo structure.
The VkImportMemoryWin32HandleInfoKHR structure is defined as:
typedef struct VkImportMemoryWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportMemoryWin32HandleInfoKHR;
Members
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to an extension-specific structure. -
handleTypespecifies the type ofhandleorname. -
handleis the external handle to import, orNULL. -
nameis a null-terminated UTF-16 string naming the underlying memory resource to import, orNULL.
Description
Importing memory objects 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 underlying memory into multiple instances
of Vulkan, into the same instance from which it was exported, and multiple
times into a given Vulkan instance.
In all cases, each import operation must create a distinct
VkDeviceMemory object.
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.