VKGETPHYSICALDEVICES(3)

NAME
vkGetPhysicalDeviceSurfaceCapabilitiesKHR - get surface capabilities.

C SPECIFICATION

    VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,
        VkSurfaceCapabilitiesKHR*                   pSurfaceCapabilities);

PARAMETERS

physicalDevice
    A valid physical device.

surface
    VkSurface to query.

pSurfaceCapabilities
    A pointer to an instance of VkSurfaceCapabilitiesKHR that will be filled.

DESCRIPTION

vkGetPhysicalDeviceSurfaceCapabilitiesKHR queries the basic capabilities of a surface, needed in order to create a swapchain.

pSurfaceCapabilities is an instance of the VkSurfaceCapabilitiesKHR structure, the definition of which is:

    typedef struct VkSurfaceCapabilitiesKHR {
        uint32_t                         minImageCount;
        uint32_t                         maxImageCount;
        VkExtent2D                       currentExtent;
        VkExtent2D                       minImageExtent;
        VkExtent2D                       maxImageExtent;
        uint32_t                         maxImageArrayLayers;
        VkSurfaceTransformFlagsKHR       supportedTransforms;
        VkSurfaceTransformFlagBitsKHR    currentTransform;
        VkCompositeAlphaFlagsKHR         supportedCompositeAlpha;
        VkImageUsageFlags                supportedUsageFlags;
    } VkSurfaceCapabilitiesKHR;

VALID USAGE

    • physicalDevice must be a valid VkPhysicalDevice handle

    • surface must be a valid VkSurfaceKHR handle

    • pSurfaceCapabilities must be a pointer to a VkSurfaceCapabilitiesKHR structure

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

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

vkGetPhysicalDeviceSurfaceFormatsKHR

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.