C Specification

The VkSurfacePresentModeEXT structure is defined as:

// Provided by VK_EXT_surface_maintenance1
typedef struct VkSurfacePresentModeEXT {
    VkStructureType     sType;
    void*               pNext;
    VkPresentModeKHR    presentMode;
} VkSurfacePresentModeEXT;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • presentMode is the presentation mode the swapchain will use.

Description

If the VkSurfacePresentModeEXT structure is included in the pNext chain of VkPhysicalDeviceSurfaceInfo2KHR, the values returned in VkSurfaceCapabilitiesKHR::minImageCount, VkSurfaceCapabilitiesKHR::maxImageCount, VkSurfacePresentScalingCapabilitiesEXT::minScaledImageExtent, and VkSurfacePresentScalingCapabilitiesEXT::maxScaledImageExtent are valid only for the specified presentMode. If presentMode is VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, the per-present mode image counts must both be one. The per-present mode image counts may be less-than or greater-than the image counts returned when VkSurfacePresentModeEXT is not provided.

Note

If VkSwapchainPresentModesCreateInfoEXT is provided to swapchain creation, the requirements for forward progress may be less strict. For example, a FIFO swapchain might only require 2 images to guarantee forward progress, but a MAILBOX one might require 4. Without the per-present image counts, such an implementation would have to return 4 in VkSurfaceCapabilitiesKHR::minImageCount, which pessimizes FIFO. Conversely, an implementation may return a low number for minImageCount, but internally bump the image count when application queries vkGetSwapchainImagesKHR, which can surprise applications, and is not discoverable until swapchain creation. Using VkSurfacePresentModeEXT and VkSwapchainPresentModesCreateInfoEXT together effectively removes this problem.

VkSwapchainPresentModesCreateInfoEXT is required for the specification to be backwards compatible with applications that do not know about, or make use of this feature.

Valid Usage
Valid Usage (Implicit)
  • VUID-VkSurfacePresentModeEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT

  • VUID-VkSurfacePresentModeEXT-presentMode-parameter
    presentMode must be a valid VkPresentModeKHR value

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0