VkSurfacePresentScalingCapabilitiesKHR
The VkSurfacePresentScalingCapabilitiesKHR structure is defined as:
typedef struct VkSurfacePresentScalingCapabilitiesKHR {
VkStructureType sType;
void* pNext;
VkPresentScalingFlagsKHR supportedPresentScaling;
VkPresentGravityFlagsKHR supportedPresentGravityX;
VkPresentGravityFlagsKHR supportedPresentGravityY;
VkExtent2D minScaledImageExtent;
VkExtent2D maxScaledImageExtent;
} VkSurfacePresentScalingCapabilitiesKHR;
pub struct SurfacePresentScalingCapabilitiesKHR {
s_type: vk::StructureType,
p_next: *mut c_void,
supported_present_scaling: vk::PresentScalingFlagsKHR,
supported_present_gravity_x: vk::PresentGravityFlagsKHR,
supported_present_gravity_y: vk::PresentGravityFlagsKHR,
min_scaled_image_extent: vk::Extent2D, // Supported minimum image width and height for the surface when scaling is used
max_scaled_image_extent: vk::Extent2D, // Supported maximum image width and height for the surface when scaling is used
}
typedef VkSurfacePresentScalingCapabilitiesKHR VkSurfacePresentScalingCapabilitiesEXT;
type SurfacePresentScalingCapabilitiesEXT = vk::SurfacePresentScalingCapabilitiesKHR;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.supportedPresentScalingis a bitmask of VkPresentScalingFlagBitsKHR representing the scaling methods supported by the surface, or0if application-defined scaling is not supported.supportedPresentGravityXis a bitmask of VkPresentGravityFlagBitsKHR representing the X-axis pixel gravity supported by the surface, or0if Vulkan-defined pixel gravity is not supported for the X axis.supportedPresentGravityYis a bitmask of VkPresentGravityFlagBitsKHR representing the Y-axis pixel gravity supported by the surface, or0if Vulkan-defined pixel gravity is not supported for the Y axis.minScaledImageExtentcontains the smallest valid swapchain extent for the surface on the specified device when one of the scaling methods specified insupportedPresentScalingis used, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface. Thewidthandheightof the extent will each be smaller than or equal to the correspondingwidthandheightof VkSurfaceCapabilitiesKHR::minImageExtent.maxScaledImageExtentcontains the largest valid swapchain extent for the surface on the specified device when one of the scaling methods specified insupportedPresentScalingis used, or the special value described above forminScaledImageExtent. Thewidthandheightof the extent will each be greater than or equal to the correspondingwidthandheightof VkSurfaceCapabilitiesKHR::maxImageExtent.
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.
Valid Usage (Implicit)
VUID-VkSurfacePresentScalingCapabilitiesKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_KHR
VUID-VkSurfacePresentScalingCapabilitiesKHR-supportedPresentScaling-parameter
supportedPresentScaling must be a valid combination of VkPresentScalingFlagBitsKHR values
VUID-VkSurfacePresentScalingCapabilitiesKHR-supportedPresentGravityX-parameter
supportedPresentGravityX must be a valid combination of VkPresentGravityFlagBitsKHR values
VUID-VkSurfacePresentScalingCapabilitiesKHR-supportedPresentGravityY-parameter
supportedPresentGravityY must be a valid combination of VkPresentGravityFlagBitsKHR values