VkBindBufferMemoryInfo(3)

# VkBindBufferMemoryInfo(3) Manual Page

## Name

VkBindBufferMemoryInfo - Structure specifying how to bind a buffer to memory

Loading… please wait.

## C Specification

`VkBindBufferMemoryInfo` contains members corresponding to the parameters of vkBindBufferMemory.

The `VkBindBufferMemoryInfo` structure is defined as:

    // Provided by VK_VERSION_1_1
    typedef struct VkBindBufferMemoryInfo {
        VkStructureType    sType;
        const void*        pNext;
        VkBuffer           buffer;
        VkDeviceMemory     memory;
        VkDeviceSize       memoryOffset;
    } VkBindBufferMemoryInfo;

or the equivalent

    // Provided by VK_KHR_bind_memory2
    typedef VkBindBufferMemoryInfo VkBindBufferMemoryInfoKHR;

## Members

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `buffer` is the buffer to be attached to memory.

- `memory` is a VkDeviceMemory object describing the device memory to attach.

- `memoryOffset` is the start offset of the region of `memory` which is to be bound to the buffer. The number of bytes returned in the `VkMemoryRequirements`::`size` member in `memory`, starting from `memoryOffset` bytes, will be bound to the specified buffer.

## Description

Valid Usage

- VUID-VkBindBufferMemoryInfo-buffer-07459
  `buffer` must not have been bound to a memory object

- VUID-VkBindBufferMemoryInfo-buffer-01030
  `buffer` must not have been created with any sparse memory binding flags

- VUID-VkBindBufferMemoryInfo-memoryOffset-01031
  `memoryOffset` must be less than the size of `memory`

- VUID-VkBindBufferMemoryInfo-memory-01035
  `memory` must have been allocated using one of the memory types allowed in the `memoryTypeBits` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-VkBindBufferMemoryInfo-None-10739
  If `memory` was not allocated from a memory heap with the `VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM` property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-VkBindBufferMemoryInfo-memory-10740
  If `memory` was allocated from a memory heap with the `VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM` property set, `memoryOffset` must be an integer multiple of the `alignment` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer`

- VUID-VkBindBufferMemoryInfo-None-10741
  If `memory` was not allocated from a memory heap with the `VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM` property set, `size` member of the `VkMemoryRequirements` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkBindBufferMemoryInfo-memory-10742
  If `memory` was allocated from a memory heap with the `VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM` property set, `size` member of the `VkTileMemoryRequirementsQCOM` structure returned from a call to `vkGetBufferMemoryRequirements` with `buffer` must be less than or equal to the size of `memory` minus `memoryOffset`

- VUID-VkBindBufferMemoryInfo-buffer-01444
  If `buffer` requires a dedicated allocation (as reported by vkGetBufferMemoryRequirements2 in VkMemoryDedicatedRequirements::`requiresDedicatedAllocation` for `buffer`), `memory` must have been allocated with VkMemoryDedicatedAllocateInfo::`buffer` equal to `buffer`

- VUID-VkBindBufferMemoryInfo-memory-01508
  If the `VkMemoryAllocateInfo` provided when `memory` was allocated included a VkMemoryDedicatedAllocateInfo structure in its `pNext` chain, and VkMemoryDedicatedAllocateInfo::`buffer` was not VK_NULL_HANDLE, then `buffer` must equal VkMemoryDedicatedAllocateInfo::`buffer`, and `memoryOffset` must be zero

- VUID-VkBindBufferMemoryInfo-None-01898
  If `buffer` was created with the `VK_BUFFER_CREATE_PROTECTED_BIT` bit set, the buffer must be bound to a memory object allocated with a memory type that reports `VK_MEMORY_PROPERTY_PROTECTED_BIT`

- VUID-VkBindBufferMemoryInfo-None-01899
  If `buffer` was created with the `VK_BUFFER_CREATE_PROTECTED_BIT` bit not set, the buffer must not be bound to a memory object allocated with a memory type that reports `VK_MEMORY_PROPERTY_PROTECTED_BIT`

- VUID-VkBindBufferMemoryInfo-buffer-01038
  If `buffer` was created with VkDedicatedAllocationBufferCreateInfoNV::`dedicatedAllocation` equal to `VK_TRUE`, `memory` must have been allocated with VkDedicatedAllocationMemoryAllocateInfoNV::`buffer` equal to a buffer handle created with identical creation parameters to `buffer` and `memoryOffset` must be zero

- VUID-VkBindBufferMemoryInfo-apiVersion-07920
  If the VK_KHR_dedicated_allocation extension is not enabled, VkPhysicalDeviceProperties::`apiVersion` is less than Vulkan 1.1, and `buffer` was not created with VkDedicatedAllocationBufferCreateInfoNV::`dedicatedAllocation` equal to `VK_TRUE`, `memory` must not have been allocated dedicated for a specific buffer or image

- VUID-VkBindBufferMemoryInfo-memory-02726
  If the value of VkExportMemoryAllocateInfo::`handleTypes` used to allocate `memory` is not `0`, it must include at least one of the handles set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-VkBindBufferMemoryInfo-memory-02985
  If `memory` was allocated by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-`NULL` `buffer` value, the external handle type of the imported memory must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-VkBindBufferMemoryInfo-memory-02986
  If `memory` was allocated with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-`NULL` `buffer` value, `VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID` must also have been set in VkExternalMemoryBufferCreateInfo::`handleTypes` when `buffer` was created

- VUID-VkBindBufferMemoryInfo-bufferDeviceAddress-03339
  If the VkPhysicalDeviceBufferDeviceAddressFeatures::`bufferDeviceAddress` feature is enabled and `buffer` was created with the `VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT` bit set, `memory` must have been allocated with the `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT` bit set

- VUID-VkBindBufferMemoryInfo-bufferDeviceAddressCaptureReplay-09200
  If the VkPhysicalDeviceBufferDeviceAddressFeatures::`bufferDeviceAddressCaptureReplay` feature is enabled and `buffer` was created with the `VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT` bit set, `memory` must have been allocated with the `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT` bit set

- VUID-VkBindBufferMemoryInfo-buffer-06408
  If `buffer` was created with VkBufferCollectionBufferCreateInfoFUCHSIA chained to VkBufferCreateInfo::`pNext`, `memory` must be allocated with a VkImportMemoryBufferCollectionFUCHSIA chained to VkMemoryAllocateInfo::`pNext`

- VUID-VkBindBufferMemoryInfo-descriptorBufferCaptureReplay-08112
  If the `buffer` was created with the `VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT` bit set, `memory` must have been allocated with the `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT` bit set

- VUID-VkBindBufferMemoryInfo-buffer-09201
  If the `buffer` was created with the `VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT` bit set, `memory` must have been allocated with the `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT` bit set

- VUID-VkBindBufferMemoryInfo-pNext-01605
  If the `pNext` chain includes a VkBindBufferMemoryDeviceGroupInfo structure, all instances of `memory` specified by VkBindBufferMemoryDeviceGroupInfo::`pDeviceIndices` must have been allocated

Valid Usage (Implicit)

- VUID-VkBindBufferMemoryInfo-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO`

- VUID-VkBindBufferMemoryInfo-pNext-pNext
  Each `pNext` member of any structure (including this one) in the `pNext` chain must be either `NULL` or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfo or VkBindMemoryStatus

- VUID-VkBindBufferMemoryInfo-sType-unique
  The `sType` value of each structure in the `pNext` chain must be unique

- VUID-VkBindBufferMemoryInfo-buffer-parameter
  `buffer` must be a valid VkBuffer handle

- VUID-VkBindBufferMemoryInfo-memory-parameter
  `memory` must be a valid VkDeviceMemory handle

- VUID-VkBindBufferMemoryInfo-commonparent
  Both of `buffer`, and `memory` must have been created, allocated, or retrieved from the same VkDevice

## See Also

VK_VERSION_1_1, VkBuffer, VkDeviceMemory, VkDeviceSize, VkStructureType, vkBindBufferMemory2, vkBindBufferMemory2KHR

## 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 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0