Function Prototype

vkGetPhysicalDeviceSurfaceCapabilities2EXT

Query surface capabilities

To query the basic capabilities of a surface, needed in order to create a swapchain, call:

VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
    VkPhysicalDevice physicalDevice,
    VkSurfaceKHR surface,
    VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
  • physicalDevice is the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.
  • surface is the surface that will be associated with the swapchain.
  • pSurfaceCapabilities is a pointer to a VkSurfaceCapabilities2EXT structure in which the capabilities are returned.

vkGetPhysicalDeviceSurfaceCapabilities2EXT behaves similarly to vkGetPhysicalDeviceSurfaceCapabilitiesKHR, with the ability to return extended information by adding extending structures to the pNext chain of its pSurfaceCapabilities parameter.

Valid Usage

VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-06211

surface must be supported by physicalDevice, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism

Valid Usage (Implicit)

VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent

Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance