# VkMemoryAllocateFlagBits(3) Manual Page

## Name

VkMemoryAllocateFlagBits - Bitmask specifying flags for a device memory allocation

## C Specification

Bits which can be set in VkMemoryAllocateFlagsInfo::`flags`, controlling device memory allocation, are:

    typedef enum VkMemoryAllocateFlagBits {
        VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001,
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT = 0x00000002,
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000004,
        VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT,
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT,
        VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
        VK_MEMORY_ALLOCATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
    } VkMemoryAllocateFlagBits;

or the equivalent

    typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR;

## Description

- `VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT` specifies that memory will be allocated for the devices in VkMemoryAllocateFlagsInfo::`deviceMask`.

- `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT` specifies that the memory can be attached to a buffer object created with the `VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT` bit set in `usage`, and that the memory handle can be used to retrieve an opaque address via vkGetDeviceMemoryOpaqueCaptureAddress.

- `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT` specifies that the memory’s address can be saved and reused on a subsequent run (e.g. for trace capture and replay), see VkBufferOpaqueCaptureAddressCreateInfo for more detail.

## See Also

VkMemoryAllocateFlags

## 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.