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:
VkResult vkCreateViSurfaceNN(
VkInstance instance,
const VkViSurfaceCreateInfoNN* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
Parameters
-
instance
is the instance with which to associate the surface. -
pCreateInfo
is a pointer to aVkViSurfaceCreateInfoNN
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.
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.
Copyright
Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.