| // Copyright 2018-2021 The Khronos Group, Inc. |
| // |
| // SPDX-License-Identifier: CC-BY-4.0 |
| |
| [open,refpage='vkGetPhysicalDeviceSurfaceCapabilities2EXT',desc='Query surface capabilities',type='protos'] |
| -- |
| To query the basic capabilities of a surface, needed in order to create a |
| swapchain, call: |
| |
| include::{generated}/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 a |
| 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 extending structures to the pname:pNext chain |
| of its pname:pSurfaceCapabilities parameter. |
| |
| .Valid Usage |
| **** |
| include::{chapters}/commonvalidity/surface_physical_device_common.txt[] |
| **** |
| |
| include::{generated}/validity/protos/vkGetPhysicalDeviceSurfaceCapabilities2EXT.txt[] |
| -- |
| |
| [open,refpage='VkSurfaceCapabilities2EXT',desc='Structure describing capabilities of a surface',type='structs'] |
| -- |
| The sname:VkSurfaceCapabilities2EXT structure is defined as: |
| |
| include::{generated}/api/structs/VkSurfaceCapabilities2EXT.txt[] |
| |
| * pname:sType is the type of this structure. |
| * pname:pNext is `NULL` or a pointer to a structure extending this |
| structure. |
| include::{chapters}/VK_KHR_surface/wsi.txt[tag=surface_capabilities_members] |
| * pname:supportedSurfaceCounters is a bitmask of |
| elink:VkSurfaceCounterFlagBitsEXT indicating the supported surface |
| counter types. |
| |
| .Valid Usage |
| **** |
| * [[VUID-VkSurfaceCapabilities2EXT-supportedSurfaceCounters-01246]] |
| pname:supportedSurfaceCounters must: not include |
| ename:VK_SURFACE_COUNTER_VBLANK_BIT_EXT unless the surface queried is a |
| <<wsi-display-surfaces,display surface>> |
| **** |
| |
| include::{generated}/validity/structs/VkSurfaceCapabilities2EXT.txt[] |
| -- |
| |
| [open,refpage='VkSurfaceCounterFlagBitsEXT',desc='Surface-relative counter types',type='enums'] |
| -- |
| Bits which can: be set in |
| slink:VkSurfaceCapabilities2EXT::pname:supportedSurfaceCounters, indicating |
| supported surface counter types, are: |
| |
| include::{generated}/api/enums/VkSurfaceCounterFlagBitsEXT.txt[] |
| |
| * ename:VK_SURFACE_COUNTER_VBLANK_BIT_EXT specifies a counter incrementing |
| once every time a vertical blanking period occurs on the display |
| associated with the surface. |
| -- |
| |
| [open,refpage='VkSurfaceCounterFlagsEXT',desc='Bitmask of VkSurfaceCounterFlagBitsEXT',type='flags'] |
| -- |
| include::{generated}/api/flags/VkSurfaceCounterFlagsEXT.txt[] |
| |
| tname:VkSurfaceCounterFlagsEXT is a bitmask type for setting a mask of zero |
| or more elink:VkSurfaceCounterFlagBitsEXT. |
| -- |
| |