vkGetBufferDeviceAddress(3)

# vkGetBufferDeviceAddress(3) Manual Page

## Name

vkGetBufferDeviceAddress - Query an address of a buffer

## C Specification

To query a 64-bit buffer device address value which can be used to identify a buffer to API commands or through which buffer memory can be accessed, call:

    // Provided by VK_VERSION_1_2
    VkDeviceAddress vkGetBufferDeviceAddress(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

    // Provided by VK_KHR_buffer_device_address
    // Equivalent to vkGetBufferDeviceAddress
    VkDeviceAddress vkGetBufferDeviceAddressKHR(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

    // Provided by VK_EXT_buffer_device_address
    // Equivalent to vkGetBufferDeviceAddress
    VkDeviceAddress vkGetBufferDeviceAddressEXT(
        VkDevice                                    device,
        const VkBufferDeviceAddressInfo*            pInfo);

## Parameters

- `device` is the logical device that the buffer was created on.

- `pInfo` is a pointer to a VkBufferDeviceAddressInfo structure specifying the buffer to retrieve an address for.

## Description

The 64-bit return value, `bufferBaseAddress`, is an address of the start of `pInfo->buffer`. Addresses in the range [`bufferBaseAddress`, `bufferBaseAddress` + VkBufferCreateInfo::`size`) can be used to access the memory bound to this buffer on the device.

A value of zero is reserved as a “null” pointer and must not be returned as a valid buffer device address.

If the buffer was created with a non-zero value of VkBufferOpaqueCaptureAddressCreateInfo::`opaqueCaptureAddress` or VkBufferDeviceAddressCreateInfoEXT::`deviceAddress`, the return value will be the same address that was returned at capture time.

The returned address must satisfy the alignment requirement specified by VkMemoryRequirements::`alignment` for the buffer in VkBufferDeviceAddressInfo::`buffer`.

If multiple VkBuffer objects are bound to overlapping ranges of VkDeviceMemory, implementations may return address ranges which overlap. In this case, it is ambiguous which VkBuffer is associated with any given device address. For purposes of valid usage, if multiple VkBuffer objects can be attributed to a device address, a VkBuffer is selected such that valid usage passes, if it exists.

Valid Usage

- VUID-vkGetBufferDeviceAddress-bufferDeviceAddress-03324
  The `bufferDeviceAddress` feature or the VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::`bufferDeviceAddress` feature must be enabled, and at least one of the following conditions must be met

  - `buffer` is sparse

  - `buffer` is bound completely and contiguously to a single `VkDeviceMemory` object

  - `buffer` was created with the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag and the VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::`bufferDeviceAddress` feature is enabled on the device

- VUID-vkGetBufferDeviceAddress-device-03325
  If `device` was created with multiple physical devices, then the `bufferDeviceAddressMultiDevice` or VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::`bufferDeviceAddressMultiDevice` feature must be enabled

Valid Usage (Implicit)

- VUID-vkGetBufferDeviceAddress-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetBufferDeviceAddress-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkBufferDeviceAddressInfo structure

## See Also

VK_EXT_buffer_device_address, VK_KHR_buffer_device_address, VK_VERSION_1_2, VkBufferDeviceAddressInfo, 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 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0