C Specification
The VkSurfacePresentScalingCapabilitiesKHR
structure is defined as:
// Provided by VK_KHR_surface_maintenance1
typedef struct VkSurfacePresentScalingCapabilitiesKHR {
VkStructureType sType;
void* pNext;
VkPresentScalingFlagsKHR supportedPresentScaling;
VkPresentGravityFlagsKHR supportedPresentGravityX;
VkPresentGravityFlagsKHR supportedPresentGravityY;
VkExtent2D minScaledImageExtent;
VkExtent2D maxScaledImageExtent;
} VkSurfacePresentScalingCapabilitiesKHR;
or the equivalent
// Provided by VK_EXT_surface_maintenance1
typedef VkSurfacePresentScalingCapabilitiesKHR VkSurfacePresentScalingCapabilitiesEXT;
Members
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
supportedPresentScaling
is a bitmask of VkPresentScalingFlagBitsKHR representing the scaling methods supported by the surface, or0
if application-defined scaling is not supported. -
supportedPresentGravityX
is a bitmask of VkPresentGravityFlagBitsKHR representing the X-axis pixel gravity supported by the surface, or0
if Vulkan-defined pixel gravity is not supported for the X axis. -
supportedPresentGravityY
is a bitmask of VkPresentGravityFlagBitsKHR representing the Y-axis pixel gravity supported by the surface, or0
if Vulkan-defined pixel gravity is not supported for the Y axis. -
minScaledImageExtent
contains the smallest valid swapchain extent for the surface on the specified device when one of the scaling methods specified insupportedPresentScaling
is used, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface. Thewidth
andheight
of the extent will each be smaller than or equal to the correspondingwidth
andheight
of VkSurfaceCapabilitiesKHR::minImageExtent
. -
maxScaledImageExtent
contains the largest valid swapchain extent for the surface on the specified device when one of the scaling methods specified insupportedPresentScaling
is used, or the special value described above forminScaledImageExtent
. Thewidth
andheight
of the extent will each be greater than or equal to the correspondingwidth
andheight
of VkSurfaceCapabilitiesKHR::maxImageExtent
.
Description
To query the set of supported scaling modes for a given present mode, add a
VkSurfacePresentModeKHR structure in the pNext
chain of
VkPhysicalDeviceSurfaceInfo2KHR when calling
vkGetPhysicalDeviceSurfaceCapabilities2KHR.
The implementation must return the same values in
VkSurfacePresentScalingCapabilitiesKHR
for any of the compatible
present modes as obtained through
VkSurfacePresentModeCompatibilityKHR.
The application can specify the scaling mode when creating a swapchain through the use of VkSwapchainPresentScalingCreateInfoKHR.
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.