To export a Windows handle representing the state of a fence, call:
// Provided by VK_KHR_external_fence_win32 VkResult vkGetFenceWin32HandleKHR( VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
deviceis the logical device that created the fence being exported.
pGetWin32HandleInfois a pointer to a VkFenceGetWin32HandleInfoKHR structure containing parameters of the export operation.
pHandlewill return the Windows handle representing the fence state.
For handle types defined as NT handles, the handles returned by
vkGetFenceWin32HandleKHR are owned by the application.
To avoid leaking resources, the application must release ownership of them
CloseHandle system call when they are no longer needed.
Exporting a Windows handle from a fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence Payloads.
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.