C Specification

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 (Implicit)
  • physicalDevice must be a valid VkPhysicalDevice handle

  • surface must be a valid VkSurfaceKHR handle

  • pSurfaceCapabilities must be a valid pointer to a VkSurfaceCapabilitiesKHR structure

  • Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance

Return Codes
On success, this command returns

On failure, this command returns



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 (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.