VKCREATESHAREDSWAPCH(3)

NAME
vkCreateSharedSwapchainsKHR - create multiple swapchains that share presentable images.

C SPECIFICATION

    VkResult vkCreateSharedSwapchainsKHR(
        VkDevice                                    device,
        uint32_t                                    swapchainCount,
        const VkSwapchainCreateInfoKHR*             pCreateInfos,
        const VkAllocationCallbacks*                pAllocator,
        VkSwapchainKHR*                             pSwapchains);

PARAMETERS

device
    The VkDevice assocated with swapchain.

swapchainCount
    The count of the array of swapchain create info.

pCreateInfos
    A pointer to an array of VkSwapchainCreateInfoKHR structures containing the parameters affecting the creation of the swapchain objects.

pAllocator
    The allocator used for host memory allocated for the swapchain objects.

pSwapchains
    The array of created swapchains.

DESCRIPTION

vkCreateSharedSwapchainsKHR creates multiple swapchains that share images.

pCreateInfo is an array of the VkSwapchainCreateInfoKHR structure, the definition of which is:

    typedef struct VkSwapchainCreateInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        VkSwapchainCreateFlagsKHR        flags;
        VkSurfaceKHR                     surface;
        uint32_t                         minImageCount;
        VkFormat                         imageFormat;
        VkColorSpaceKHR                  imageColorSpace;
        VkExtent2D                       imageExtent;
        uint32_t                         imageArrayLayers;
        VkImageUsageFlags                imageUsage;
        VkSharingMode                    imageSharingMode;
        uint32_t                         queueFamilyIndexCount;
        const uint32_t*                  pQueueFamilyIndices;
        VkSurfaceTransformFlagBitsKHR    preTransform;
        VkCompositeAlphaFlagBitsKHR      compositeAlpha;
        VkPresentModeKHR                 presentMode;
        VkBool32                         clipped;
        VkSwapchainKHR                   oldSwapchain;
    } VkSwapchainCreateInfoKHR;

VALID USAGE

    • device must be a valid VkDevice handle

    • pCreateInfos must be a pointer to an array of swapchainCount valid VkSwapchainCreateInfoKHR structures

    • If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure

    • pSwapchains must be a pointer to an array of swapchainCount VkSwapchainKHR handles

    • swapchainCount must be greater than 0

HOST SYNCHRONIZATION

    • Host access to pCreateInfos[].surface must be externally synchronized

    • Host access to pCreateInfos[].oldSwapchain must be externally synchronized

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_INCOMPATIBLE_DISPLAY_KHR

        • VK_ERROR_DEVICE_LOST

        • VK_ERROR_SURFACE_LOST_KHR

SEE ALSO

vkCreateSwapchainKHR, vkDestroySwapchainKHR, vkGetSwapchainImagesKHR, vkAcquireNextImageKHR, vkQueuePresentKHR

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.