Function Prototype
vkGetPhysicalDeviceSurfaceCapabilitiesKHR
Query surface capabilities
To query the basic capabilities of a surface, needed in order to create a swapchain, call:
VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
physicalDevice
is the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.surface
is the surface that will be associated with the swapchain.pSurfaceCapabilities
is a pointer to a VkSurfaceCapabilitiesKHR structure in which the capabilities are returned.
Valid Usage
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06523
surface
must be a valid VkSurfaceKHR handle
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211
surface
must be supported by physicalDevice
, as reported by
vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent
platform-specific mechanism
Valid Usage (Implicit)
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter
physicalDevice
must be a valid VkPhysicalDevice handle
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-parameter
surface
must be a valid VkSurfaceKHR handle
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-pSurfaceCapabilities-parameter
pSurfaceCapabilities
must be a valid pointer to a VkSurfaceCapabilitiesKHR structure
VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-commonparent
Both of physicalDevice
, and surface
must have been created, allocated, or retrieved from the same VkInstance