C Specification
To create a VkSurfaceKHR object for a Win32 window, call:
// Provided by VK_KHR_win32_surface
VkResult vkCreateWin32SurfaceKHR(
VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
Parameters
-
instanceis the instance to associate the surface with. -
pCreateInfois a pointer to a VkWin32SurfaceCreateInfoKHR structure containing parameters affecting the creation of the surface object. -
pAllocatoris the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation). -
pSurfaceis a pointer to a VkSurfaceKHR handle in which the created surface object is returned.
Description
Some Vulkan functions may call the SendMessage system API when
interacting with a VkSurfaceKHR through a VkSwapchainKHR.
In a multithreaded environment, calling SendMessage from a thread that is
not the thread associated with pCreateInfo->hwnd will block until the
application has processed the window message.
Thus, applications should either call these Vulkan functions on the message
pump thread, or make sure their message pump is actively running.
Failing to do so may result in deadlocks.
The functions subject to this requirement are:
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.