Function Prototype
vkGetMemoryWin32HandleNV
Retrieve Win32 handle to a device memory object
To retrieve the handle corresponding to a device memory object created with
VkExportMemoryAllocateInfoNV::handleTypes set to include
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV or
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, call:
VkResult vkGetMemoryWin32HandleNV(
VkDevice device,
VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagsNV handleType,
HANDLE* pHandle);
deviceis the logical device that owns the memory.memoryis the VkDeviceMemory object.handleTypeis a bitmask of VkExternalMemoryHandleTypeFlagBitsNV containing a single bit specifying the type of handle requested.pHandleis a pointer to a WindowsHANDLEin which the handle is returned.
Valid Usage
VUID-vkGetMemoryWin32HandleNV-handleType-01326
handleType must be a flag specified in
VkExportMemoryAllocateInfoNV::handleTypes when allocating
memory
Valid Usage (Implicit)
VUID-vkGetMemoryWin32HandleNV-device-parameter
device must be a valid VkDevice handle
VUID-vkGetMemoryWin32HandleNV-memory-parameter
memory must be a valid VkDeviceMemory handle
VUID-vkGetMemoryWin32HandleNV-handleType-parameter
handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values
VUID-vkGetMemoryWin32HandleNV-handleType-requiredbitmask
handleType must not be 0
VUID-vkGetMemoryWin32HandleNV-pHandle-parameter
pHandle must be a valid pointer to a HANDLE value
VUID-vkGetMemoryWin32HandleNV-memory-parent
memory must have been created, allocated, or retrieved from device