C Specification
To create a VkSurfaceKHR object for an nn::vi::Layer,
query the layer’s native handle using
nn::vi::GetNativeWindow, and then call:
// Provided by VK_NN_vi_surface
VkResult vkCreateViSurfaceNN(
VkInstance instance,
const VkViSurfaceCreateInfoNN* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
Parameters
-
instanceis the instance with which to associate the surface. -
pCreateInfois a pointer to a VkViSurfaceCreateInfoNN 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
During the lifetime of a surface created using a particular
nn::vi::NativeWindowHandle, applications must not attempt to
create another surface for the same nn::vi::Layer or attempt
to connect to the same nn::vi::Layer through other platform
mechanisms.
If the native window is created with a specified size, currentExtent
will reflect that size.
In this case, applications should use the same size for the swapchain’s
imageExtent.
Otherwise, the 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
nn::vi::GetDisplayResolution).
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.