VK_KHR_swapchain extension is the device-level companion to the VK_KHR_surface extension. It introduces VkSwapchainKHR objects, which provide the ability to present rendering results to a surface.
The example code for the VK_KHR_surface and VK_KHR_swapchain extensions was removed from the appendix after revision 1.0.29. This WSI example code was ported to the cube demo that is shipped with the official Khronos SDK, and is being kept up-to-date in that location (see: https://github.com/KhronosGroup/Vulkan-Tools/blob/master/cube/cube.c).
VK_KHR_swapchainVK_KHR_surface| Modifier and Type | Field and Description |
|---|---|
| public static final int | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
VkDeviceGroupPresentModeFlagBitsKHR - Bitmask specifying supported device group present modes Description
|
| public static final int | VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR
VkDeviceGroupPresentModeFlagBitsKHR - Bitmask specifying supported device group present modes Description
|
| public static final int | VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR
VkDeviceGroupPresentModeFlagBitsKHR - Bitmask specifying supported device group present modes Description
|
| public static final int | VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR
VkDeviceGroupPresentModeFlagBitsKHR - Bitmask specifying supported device group present modes Description
|
| public static final int | VK_ERROR_OUT_OF_DATE_KHR
Extends |
| public static final int | VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
Extends |
| public static final String | VK_KHR_SWAPCHAIN_EXTENSION_NAME
The extension name. |
| public static final int | VK_KHR_SWAPCHAIN_SPEC_VERSION
The extension specification version. |
| public static final int | VK_OBJECT_TYPE_SWAPCHAIN_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_PRESENT_INFO_KHR
Extends |
| public static final int | VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR
Extends |
| public static final int | VK_SUBOPTIMAL_KHR
Extends |
| public static final int | VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR
Extends |
| public static final int | VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
Extends |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static int | nvkAcquireNextImage2KHR(VkDevice device, long pAcquireInfo, long pImageIndex)
Unsafe version of: |
| public static int | nvkAcquireNextImageKHR(VkDevice device, long swapchain, long timeout, long semaphore, long fence, long pImageIndex)
Unsafe version of: |
| public static int | nvkCreateSwapchainKHR(VkDevice device, long pCreateInfo, long pAllocator, long pSwapchain)
Unsafe version of: |
| public static void | nvkDestroySwapchainKHR(VkDevice device, long swapchain, long pAllocator)
Unsafe version of: |
| public static int | nvkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, long pDeviceGroupPresentCapabilities)
Unsafe version of: |
| public static int | nvkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, long pModes)
Unsafe version of: |
| public static int | nvkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, long
a pointer to an integer related to the number of rectangles available or queried, as described below. pRectCount, long pRects)Unsafe version of: |
| public static int | nvkGetSwapchainImagesKHR(VkDevice device, long swapchain, long
a pointer to an integer related to the number of presentable images available or queried, as described below. pSwapchainImageCount, long pSwapchainImages)Unsafe version of: |
| public static int | |
| public static int | vkAcquireNextImage2KHR(VkDevice
the device associated with device, VkAcquireNextImageInfoKHR swapchain.a pointer to a pAcquireInfo, IntBuffer VkAcquireNextImageInfoKHR structure containing parameters of the acquire.a pointer to a pImageIndex)uint32_t that is set to the index of the next image to use.Retrieve the index of the next available presentable image. |
| public static int | vkAcquireNextImage2KHR(VkDevice device, VkAcquireNextImageInfoKHR pAcquireInfo, int[] pImageIndex)
Array version of: |
| public static int | vkAcquireNextImageKHR(VkDevice
the device associated with device, long swapchain.the non-retired swapchain from which an image is being acquired. swapchain, long specifies how long the function waits, in nanoseconds, if no image is available. timeout, long NULL_HANDLE or a semaphore to signal.NULL_HANDLE or a fence to signal.a pointer to a pImageIndex)uint32_t in which the index of the next image to use (i.e. an index into the array of images returned by vkGetSwapchainImagesKHR) is returned.Retrieve the index of the next available presentable image. |
| public static int | vkAcquireNextImageKHR(VkDevice device, long swapchain, long timeout, long semaphore, long fence, int[] pImageIndex)
Array version of: |
| public static int | vkCreateSwapchainKHR(VkDevice
the device to create the swapchain for. device, VkSwapchainCreateInfoKHR a pointer to a pCreateInfo, VkAllocationCallbacks VkSwapchainCreateInfoKHR structure specifying the parameters of the created swapchain.the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation). pAllocator, LongBuffer a pointer to a pSwapchain)VkSwapchainKHR handle in which the created swapchain object will be returned.Create a swapchain. |
| public static int | vkCreateSwapchainKHR(VkDevice device, VkSwapchainCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSwapchain)
Array version of: |
| public static void | vkDestroySwapchainKHR(VkDevice
the device, long VkDevice associated with swapchain.the swapchain to destroy. swapchain, VkAllocationCallbacks the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation). pAllocator)Destroy a swapchain object. |
| public static int | vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice
the logical device. device, VkDeviceGroupPresentCapabilitiesKHR a pointer to a pDeviceGroupPresentCapabilities)VkDeviceGroupPresentCapabilitiesKHR structure in which the device’s capabilities are returned.Query present capabilities from other physical devices. |
| public static int | vkGetDeviceGroupSurfacePresentModesKHR(VkDevice
the logical device. device, long the surface. surface, IntBuffer a pointer to a pModes)VkDeviceGroupPresentModeFlagsKHR in which the supported device group present modes for the surface are returned.Query present capabilities for a surface. |
| public static int | vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, int[] pModes)
Array version of: |
| public static int | vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice
the physical device. physicalDevice, long the surface. surface, IntBuffer a pointer to an integer related to the number of rectangles available or queried, as described below. pRectCount, VkRect2D.either pRectsNULL or a pointer to an array of VkRect2D structures.Query present rectangles for a surface on a physical device. |
| public static int | vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, int[] pRectCount, VkRect2D.
Array version of: |
| public static int | vkGetSwapchainImagesKHR(VkDevice
the device associated with device, long swapchain.the swapchain to query. swapchain, IntBuffer a pointer to an integer related to the number of presentable images available or queried, as described below. pSwapchainImageCount, LongBuffer either pSwapchainImages)NULL or a pointer to an array of VkImage handles.Obtain the array of presentable images associated with a swapchain. |
| public static int | vkGetSwapchainImagesKHR(VkDevice device, long swapchain, int[] pSwapchainImageCount, long[] pSwapchainImages)
Array version of: |
| public static int | vkQueuePresentKHR(VkQueue
a queue that is capable of presentation to the target surface’s platform on the same device as the image’s swapchain. queue, VkPresentInfoKHR a pointer to a pPresentInfo)VkPresentInfoKHR structure specifying parameters of the presentation.Queue an image for presentation. |