VKGETPHYSICALDEVICES(3)

NAME
vkGetPhysicalDeviceSurfaceFormatsKHR - get color formats supported by surface.

C SPECIFICATION

    VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,
        uint32_t*                                   pSurfaceFormatCount,
        VkSurfaceFormatKHR*                         pSurfaceFormats);

PARAMETERS

physicalDevice
    A valid physical device.

surface
    VkSurface to query.

pSurfaceFormatCount
    The number of elements in the array pointed by pSurfaceFormats .

pSurfaceFormats
    A pointer to an array of VkSurfaceFormatKHR.

DESCRIPTION

vkGetPhysicalDeviceSurfaceFormatsKHR queries the supported swapchain format-colorspace pairs for a surface.

pSurfaceFormats is an instance of the VkSurfaceFormatKHR structure, the definition of which is:

    typedef struct VkSurfaceFormatKHR {
        VkFormat           format;
        VkColorSpaceKHR    colorSpace;
    } VkSurfaceFormatKHR;

VALID USAGE

    • physicalDevice must be a valid VkPhysicalDevice handle

    • surface must be a valid VkSurfaceKHR handle

    • pSurfaceFormatCount must be a pointer to a uint32_t value

    • If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a pointer to an array of pSurfaceFormatCount VkSurfaceFormatKHR structures

    • 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

        • VK_INCOMPLETE

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

        • VK_ERROR_SURFACE_LOST_KHR

SEE ALSO

vkGetPhysicalDeviceFormatProperties, vkGetPhysicalDeviceImageFormatProperties, vkCreateSwapchainKHR

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.