Function Prototype

vkCreateViSurfaceNN

Create a slink:VkSurfaceKHR object for a VI layer

To create a VkSurfaceKHR object for an nn::vi::Layer, query the layer’s native handle using nn::vi::GetNativeWindow, and then call:

VkResult vkCreateViSurfaceNN(
    VkInstance instance,
    const VkViSurfaceCreateInfoNN* pCreateInfo,
    const VkAllocationCallbacks* pAllocator,
    VkSurfaceKHR* pSurface);
  • instance is the instance with which to associate the surface.
  • pCreateInfo is a pointer to a VkViSurfaceCreateInfoNN structure containing parameters affecting the creation of the surface object.
  • pAllocator is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).
  • pSurface is a pointer to a VkSurfaceKHR handle in which the created surface object is returned.

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).

Valid Usage (Implicit)

VUID-vkCreateViSurfaceNN-pCreateInfo-parameter

pCreateInfo must be a valid pointer to a valid VkViSurfaceCreateInfoNN structure

VUID-vkCreateViSurfaceNN-pAllocator-parameter

If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure

VUID-vkCreateViSurfaceNN-pSurface-parameter

pSurface must be a valid pointer to a VkSurfaceKHR handle