VKALLOCATECOMMANDBUF(3)

NAME
vkAllocateCommandBuffers - Allocate command buffers from an existing command pool

C SPECIFICATION

To allocate command buffers, call:

    VkResult vkAllocateCommandBuffers(
        VkDevice                                    device,
        const VkCommandBufferAllocateInfo*          pAllocateInfo,
        VkCommandBuffer*                            pCommandBuffers);

PARAMETERS

    • device is the logical device that owns the command pool.

    • pAllocateInfo is a pointer to an instance of the VkCommandBufferAllocateInfo structure describing parameters of the allocation.

    • pCommandBuffers is a pointer to an array of VkCommandBuffer handles in which the resulting command buffer objects are returned. The array must be at least the length specified by the commandBufferCount member of pAllocateInfo. Each allocated command buffer begins in the initial state.

DESCRIPTION

VALID USAGE

    • device must be a valid VkDevice handle

    • pAllocateInfo must be a pointer to a valid VkCommandBufferAllocateInfo structure

    • pCommandBuffers must be a pointer to an array of pAllocateInfo→commandBufferCount VkCommandBuffer handles

HOST SYNCHRONIZATION

    • Host access to pAllocateInfo→commandPool 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

SEE ALSO

VkCommandBuffer, VkCommandBufferAllocateInfo, VkDevice

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkAllocateCommandBuffers

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

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

AUTHOR

Khronos Group
    Author.