vkBindBufferMemory2(3)

# vkBindBufferMemory2(3) Manual Page

## Name

vkBindBufferMemory2 - Bind device memory to buffer objects

Loading... please wait.

## C Specification

To attach memory to buffer objects for one or more buffers at a time, call:

    VkResult vkBindBufferMemory2(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindBufferMemoryInfo*               pBindInfos);

or the equivalent command

    VkResult vkBindBufferMemory2KHR(
        VkDevice                                    device,
        uint32_t                                    bindInfoCount,
        const VkBindBufferMemoryInfo*               pBindInfos);

## Parameters

- `device` is the logical device that owns the buffers and memory.

- `bindInfoCount` is the number of elements in `pBindInfos`.

- `pBindInfos` is a pointer to an array of `bindInfoCount` VkBindBufferMemoryInfo structures describing buffers and memory to bind.

## Description

On some implementations, it may be more efficient to batch memory bindings into a single command.

Valid Usage (Implicit)

- `device` must be a valid VkDevice handle

- `pBindInfos` must be a valid pointer to an array of `bindInfoCount` valid VkBindBufferMemoryInfo structures

- `bindInfoCount` must be greater than `0`

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_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR`

## See Also

VkBindBufferMemoryInfo, VkDevice

## Document Notes

For more information, see the Vulkan Specification

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

## Copyright

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