1// Copyright 2018-2023 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[open,refpage='vkGetPhysicalDeviceSurfaceCapabilities2EXT',desc='Query surface capabilities',type='protos'] 6-- 7:refpage: vkGetPhysicalDeviceSurfaceCapabilities2EXT 8 9To query the basic capabilities of a surface, needed in order to create a 10swapchain, call: 11 12include::{generated}/api/protos/vkGetPhysicalDeviceSurfaceCapabilities2EXT.adoc[] 13 14 * pname:physicalDevice is the physical device that will be associated with 15 the swapchain to be created, as described for 16 flink:vkCreateSwapchainKHR. 17 * pname:surface is the surface that will be associated with the swapchain. 18 * pname:pSurfaceCapabilities is a pointer to a 19 slink:VkSurfaceCapabilities2EXT structure in which the capabilities are 20 returned. 21 22fname:vkGetPhysicalDeviceSurfaceCapabilities2EXT behaves similarly to 23flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, with the ability to return 24extended information by adding extending structures to the pname:pNext chain 25of its pname:pSurfaceCapabilities parameter. 26 27include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[] 28 29.Valid Usage 30**** 31include::{chapters}/commonvalidity/surface_physical_device_common.adoc[] 32**** 33 34include::{generated}/validity/protos/vkGetPhysicalDeviceSurfaceCapabilities2EXT.adoc[] 35-- 36 37[open,refpage='VkSurfaceCapabilities2EXT',desc='Structure describing capabilities of a surface',type='structs'] 38-- 39The sname:VkSurfaceCapabilities2EXT structure is defined as: 40 41include::{generated}/api/structs/VkSurfaceCapabilities2EXT.adoc[] 42 43 * pname:sType is a elink:VkStructureType value identifying this structure. 44 * pname:pNext is `NULL` or a pointer to a structure extending this 45 structure. 46include::{chapters}/VK_KHR_surface/wsi.adoc[tag=surface_capabilities_members] 47 * pname:supportedSurfaceCounters is a bitmask of 48 elink:VkSurfaceCounterFlagBitsEXT indicating the supported surface 49 counter types. 50 51.Valid Usage 52**** 53 * [[VUID-VkSurfaceCapabilities2EXT-supportedSurfaceCounters-01246]] 54 pname:supportedSurfaceCounters must: not include 55 ename:VK_SURFACE_COUNTER_VBLANK_BIT_EXT unless the surface queried is a 56 <<wsi-display-surfaces,display surface>> 57**** 58 59include::{generated}/validity/structs/VkSurfaceCapabilities2EXT.adoc[] 60-- 61 62[open,refpage='VkSurfaceCounterFlagBitsEXT',desc='Surface-relative counter types',type='enums'] 63-- 64Bits which can: be set in 65slink:VkSurfaceCapabilities2EXT::pname:supportedSurfaceCounters, indicating 66supported surface counter types, are: 67 68include::{generated}/api/enums/VkSurfaceCounterFlagBitsEXT.adoc[] 69 70 * ename:VK_SURFACE_COUNTER_VBLANK_BIT_EXT specifies a counter incrementing 71 once every time a vertical blanking period occurs on the display 72 associated with the surface. 73-- 74 75[open,refpage='VkSurfaceCounterFlagsEXT',desc='Bitmask of VkSurfaceCounterFlagBitsEXT',type='flags'] 76-- 77include::{generated}/api/flags/VkSurfaceCounterFlagsEXT.adoc[] 78 79tname:VkSurfaceCounterFlagsEXT is a bitmask type for setting a mask of zero 80or more elink:VkSurfaceCounterFlagBitsEXT. 81-- 82 83