To query the supported presentation modes for a surface, call:
// Provided by VK_KHR_surface VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
physicalDeviceis the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.
surfaceis the surface that will be associated with the swapchain.
pPresentModeCountis a pointer to an integer related to the number of presentation modes available or queried, as described below.
NULLor a pointer to an array of VkPresentModeKHR values, indicating the supported presentation modes.
NULL, then the number of presentation modes
supported for the given
surface is returned in
pPresentModeCount must point to a variable set by the user
to the number of elements in the
pPresentModes array, and on return
the variable is overwritten with the number of values actually written to
If the value of
pPresentModeCount is less than the number of
presentation modes supported, at most
pPresentModeCount values will be
VK_INCOMPLETE will be returned instead of
VK_SUCCESS, to indicate that not all the available modes were
VK_GOOGLE_surfaceless_query extension is enabled and
surface is VK_NULL_HANDLE, the values returned in
pPresentModes will only indicate support for
To query support for any other present mode, a valid handle must be
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.