// refBegin vkGetPhysicalDeviceSurfaceCapabilities2EXT Query surface capabilities

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

include::../../api/protos/vkGetPhysicalDeviceSurfaceCapabilities2EXT.txt[]

  * pname:physicalDevice is the physical device that will be associated with
    the swapchain to be created, as described for
    flink:vkCreateSwapchainKHR.
  * pname:surface is the surface that will be associated with the swapchain.
  * pname:pSurfaceCapabilities is a pointer to an instance of the
    slink:VkSurfaceCapabilities2EXT structure in which the capabilities are
    returned.

fname:vkGetPhysicalDeviceSurfaceCapabilities2EXT behaves similarly to
flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, with the ability to return
extended information by adding extension structures to its pname:pNext
chain.

include::../../validity/protos/vkGetPhysicalDeviceSurfaceCapabilities2EXT.txt[]

// refBegin VkSurfaceCapabilities2EXT Structure describing capabilities of a surface

The sname:VkSurfaceCapabilities2EXT structure is defined as:

include::../../api/structs/VkSurfaceCapabilities2EXT.txt[]

All members of sname:VkSurfaceCapabilities2EXT are identical to the
corresponding members of slink:VkSurfaceCapabilitiesKHR where one exists.
The remaining members are:

  * pname:sType is the type of this structure.
  * pname:pNext is `NULL` or a pointer to an extension-specific structure.
  * pname:supportedSurfaceCounters is a bitfield containing one bit set for
    each surface counter type supported.

.Valid Usage
****
  * [[VUID-VkSurfaceCapabilities2EXT-supportedSurfaceCounters-01246]]
    pname:supportedSurfaceCounters must: not include
    ename:VK_SURFACE_COUNTER_VBLANK_EXT unless the surface queried is a
    <<wsi-display-surfaces,display surface>>.
****

include::../../validity/structs/VkSurfaceCapabilities2EXT.txt[]

// refBegin VkSurfaceCounterFlagBitsEXT Surface-relative counter types

Valid values for
slink:VkSurfaceCapabilities2EXT::pname:supportedSurfaceCounters are defined
by sname:VkSurfaceCounterFlagBitsEXT as follows:

include::../../api/enums/VkSurfaceCounterFlagBitsEXT.txt[]

  * ename:VK_SURFACE_COUNTER_VBLANK_EXT A counter incrementing once every
    time a vblank period occurs on the display associated with the surface.

// refEnd VkSurfaceCounterFlagBitsEXT
