Function Prototype
vkGetMemoryWin32HandleKHR
Get a Windows HANDLE for a memory object
To export a Windows handle representing the payload of a Vulkan device memory object, call:
VkResult vkGetMemoryWin32HandleKHR(
VkDevice device,
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
pub fn get_memory_win32_handle_khr(
device: vk::Device,
p_get_win32_handle_info: *const vk::MemoryGetWin32HandleInfoKHR,
p_handle: *mut HANDLE,
) -> vk::Result;
deviceis the logical device that created the device memory being exported.pGetWin32HandleInfois a pointer to a VkMemoryGetWin32HandleInfoKHR structure containing parameters of the export operation.pHandlewill return the Windows handle representing the payload of the device memory object.
For handle types defined as NT handles, the handles returned by
vkGetMemoryWin32HandleKHR are owned by the application and hold a
reference to their payload.
To avoid leaking resources, the application must release ownership of them
using the CloseHandle system call when they are no longer needed.
Non-NT handle types do not add a reference to their associated payload.
If the original object owning the payload is destroyed, all resources and
handles sharing that payload will become invalid.
Valid Usage (Implicit)
VUID-vkGetMemoryWin32HandleKHR-device-parameter
device must be a valid VkDevice handle
VUID-vkGetMemoryWin32HandleKHR-pGetWin32HandleInfo-parameter
pGetWin32HandleInfo must be a valid pointer to a valid VkMemoryGetWin32HandleInfoKHR structure
VUID-vkGetMemoryWin32HandleKHR-pHandle-parameter
pHandle must be a valid pointer to a HANDLE value
Type
Function Prototype
Return Values
VK_SUCCESS
VK_ERROR_TOO_MANY_OBJECTS
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_UNKNOWN
VK_ERROR_VALIDATION_FAILED