vkGetPhysicalDeviceSurfaceCapabilities2KHR(3)

# vkGetPhysicalDeviceSurfaceCapabilities2KHR(3) Manual Page

## Name

vkGetPhysicalDeviceSurfaceCapabilities2KHR - Reports capabilities of a surface on a physical device

## C Specification

To query the basic capabilities of a surface defined by the core or extensions, call:

    VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR(
        VkPhysicalDevice                            physicalDevice,
        const VkPhysicalDeviceSurfaceInfo2KHR*      pSurfaceInfo,
        VkSurfaceCapabilities2KHR*                  pSurfaceCapabilities);

## Parameters

- `physicalDevice` is the physical device that will be associated with the swapchain to be created, as described for vkCreateSwapchainKHR.

- `pSurfaceInfo` is a pointer to a VkPhysicalDeviceSurfaceInfo2KHR structure describing the surface and other fixed parameters that would be consumed by vkCreateSwapchainKHR.

- `pSurfaceCapabilities` is a pointer to a VkSurfaceCapabilities2KHR structure in which the capabilities are returned.

## Description

`vkGetPhysicalDeviceSurfaceCapabilities2KHR` behaves similarly to vkGetPhysicalDeviceSurfaceCapabilitiesKHR, with the ability to specify extended inputs via chained input structures, and to return extended information via chained output structures.

Valid Usage

- If an instance of VkSurfaceCapabilitiesFullScreenExclusiveEXT is included in the `pNext` chain of `pSurfaceCapabilities`, an instance of VkSurfaceFullScreenExclusiveWin32InfoEXT must be included in the `pNext` chain of `pSurfaceInfo`.

Valid Usage (Implicit)

- `physicalDevice` must be a valid `VkPhysicalDevice` handle

- `pSurfaceInfo` must be a valid pointer to a valid `VkPhysicalDeviceSurfaceInfo2KHR` structure

- `pSurfaceCapabilities` must be a valid pointer to a `VkSurfaceCapabilities2KHR` structure

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_OUT_OF_DEVICE_MEMORY`

  - `VK_ERROR_SURFACE_LOST_KHR`

## See Also

VkPhysicalDevice, VkPhysicalDeviceSurfaceInfo2KHR, VkSurfaceCapabilities2KHR

## 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

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.