Structures
VkSurfaceCapabilitiesKHR
Structure describing capabilities of a surface
The VkSurfaceCapabilitiesKHR
structure is defined as:
typedef struct VkSurfaceCapabilitiesKHR {
uint32_t minImageCount;
uint32_t maxImageCount;
VkExtent2D currentExtent;
VkExtent2D minImageExtent;
VkExtent2D maxImageExtent;
uint32_t maxImageArrayLayers;
VkSurfaceTransformFlagsKHR supportedTransforms;
VkSurfaceTransformFlagBitsKHR currentTransform;
VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
VkImageUsageFlags supportedUsageFlags;
} VkSurfaceCapabilitiesKHR;
minImageCount
is the minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one.maxImageCount
is the maximum number of images the specified device supports for a swapchain created for the surface, and will be either 0, or greater than or equal tominImageCount
. A value of 0 means that there is no limit on the number of images, though there may be limits related to the total amount of memory used by presentable images.currentExtent
is the current width and height of the surface, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface.minImageExtent
contains the smallest valid swapchain extent for the surface on the specified device. Thewidth
andheight
of the extent will each be less than or equal to the correspondingwidth
andheight
ofcurrentExtent
, unlesscurrentExtent
has the special value described above.maxImageExtent
contains the largest valid swapchain extent for the surface on the specified device. Thewidth
andheight
of the extent will each be greater than or equal to the correspondingwidth
andheight
ofminImageExtent
. Thewidth
andheight
of the extent will each be greater than or equal to the correspondingwidth
andheight
ofcurrentExtent
, unlesscurrentExtent
has the special value described above.maxImageArrayLayers
is the maximum number of layers presentable images can have for a swapchain created for this device and surface, and will be at least one.supportedTransforms
is a bitmask of VkSurfaceTransformFlagBitsKHR indicating the presentation transforms supported for the surface on the specified device. At least one bit will be set.currentTransform
is VkSurfaceTransformFlagBitsKHR value indicating the surface’s current transform relative to the presentation engine’s natural orientation.supportedCompositeAlpha
is a bitmask of VkCompositeAlphaFlagBitsKHR, representing the alpha compositing modes supported by the presentation engine for the surface on the specified device, and at least one bit will be set. Opaque composition can be achieved in any alpha compositing mode by either using an image format that has no alpha component, or by ensuring that all pixels in the presentable images have an alpha value of 1.0.supportedUsageFlags
is a bitmask of VkImageUsageFlagBits representing the ways the application can use the presentable images of a swapchain created with VkPresentModeKHR set toVK_PRESENT_MODE_FIFO_LATEST_READY_EXT
,VK_PRESENT_MODE_IMMEDIATE_KHR
,VK_PRESENT_MODE_MAILBOX_KHR
,VK_PRESENT_MODE_FIFO_KHR
orVK_PRESENT_MODE_FIFO_RELAXED_KHR
for the surface on the specified device.VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
must be included in the set. Implementations may support additional usages.
Supported usage flags of a presentable image when using
VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
or
VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
presentation mode are
provided by
VkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags
.
Formulas such as min(N, maxImageCount
) are not correct, since
maxImageCount
may be zero.