To create a
VkSurfaceKHR object for an
query the layer’s native handle using
GetNativeWindow, and then call:
// Provided by VK_NN_vi_surface VkResult vkCreateViSurfaceNN( VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
instanceis the instance with which to associate the surface.
pCreateInfois a pointer to a
VkViSurfaceCreateInfoNNstructure 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.
During the lifetime of a surface created using a particular
NativeWindowHandle, applications must not attempt to
create another surface for the same
Layer or attempt
to connect to the same
Layer through other platform
If the native window is created with a specified size,
will reflect that size.
In this case, applications should use the same size for the swapchain’s
currentExtent will have the special value
(0xFFFFFFFF, 0xFFFFFFFF), indicating that applications are expected to
choose an appropriate size for the swapchain’s
imageExtent (e.g., by
matching the result of a call to
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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.