Class VkSurfaceCapabilitiesKHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VkSurfaceCapabilitiesKHR
    extends Struct
    implements NativeResource
    Structure describing capabilities of a surface.
    Description
    Note

    Supported usage flags of a presentable image when using PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode are provided by VkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags.

    Note

    Formulas such as min(N, maxImageCount) are not correct, since maxImageCount may be zero.

    See Also

    VkExtent2D, VkSurfaceCapabilities2KHR, GetPhysicalDeviceSurfaceCapabilitiesKHR

    Member documentation

    • minImageCount – the minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one.
    • maxImageCount – 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 to minImageCount. 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 – 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. The width and height of the extent will each be less than or equal to the corresponding width and height of currentExtent, unless currentExtent has the special value described above.
    • maxImageExtent – contains the largest valid swapchain extent for the surface on the specified device. The width and height of the extent will each be greater than or equal to the corresponding width and height of minImageExtent. The width and height of the extent will each be greater than or equal to the corresponding width and height of currentExtent, unless currentExtent has the special value described above.
    • maxImageArrayLayers – 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 – a bitmask of VkSurfaceTransformFlagBitsKHR indicating the presentation transforms supported for the surface on the specified device. At least one bit will be set.
    • currentTransformVkSurfaceTransformFlagBitsKHR value indicating the surface’s current transform relative to the presentation engine’s natural orientation.
    • supportedCompositeAlpha – 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 – a bitmask of VkImageUsageFlagBits representing the ways the application can use the presentable images of a swapchain created with VkPresentModeKHR set to PRESENT_MODE_IMMEDIATE_KHR, PRESENT_MODE_MAILBOX_KHR, PRESENT_MODE_FIFO_KHR or PRESENT_MODE_FIFO_RELAXED_KHR for the surface on the specified device. IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set but implementations may support additional usages.

    Layout

    
     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;
     }