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