VKCREATECOMMANDPOOL(3)

NAME
vkCreateCommandPool - Create a new command pool object.

C SPECIFICATION

    VkResult vkCreateCommandPool(
        VkDevice                                    device,
        const VkCommandPoolCreateInfo*              pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkCommandPool*                              pCommandPool);

PARAMETERS

device
    The device with which to create the command pool.

pCreateInfo
    A pointer to a structure containing information about the command pool.

pCommandPool
    The address of a variable to receive the handle to the new command pool.

DESCRIPTION

vkCreateCommandPool creates a new command pool object using device and places its handle in the variable whose address is given in pCommandPool. pCreateInfo is a pointer to an instance of the VkCommandPoolCreateInfo structure which contains information about how to create the new command pool. Its definition is:

    typedef struct VkCommandPoolCreateInfo {
        VkStructureType             sType;
        const void*                 pNext;
        VkCommandPoolCreateFlags    flags;
        uint32_t                    queueFamilyIndex;
    } VkCommandPoolCreateInfo;

queueFamilyIndex indicates the family of queues which the command buffer can be submitted to, as well as the subset of commands which may be recorded on it.

flags is a bitfield of flags indicating usage behavior for the pool and command buffers allocated from it. Possible values include:

VK_COMMAND_POOL_CREATE_TRANSIENT_BIT indicates that command buffers created from the pool will be short-lived, meaning that they will be reset or destroyed in a relatively short timeframe.

VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT controls whether it is legal to call vkResetCommandBuffer on a command buffer allocated from the pool. If this is not set, then the command buffers may only be reset in bulk by calling vkResetCommandPool.

VALID USAGE

    • device must be a valid VkDevice handle

    • pCreateInfo must be a pointer to a valid VkCommandPoolCreateInfo structure

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

    • pCommandPool must be a pointer to a VkCommandPool handle

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

SEE ALSO

vkDestroyCommandPool, vkResetCommandPool

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.