C Specification

Bits which may be set in VkMemoryType::propertyFlags, indicating properties of a memory type, are:

// Provided by VK_VERSION_1_0
typedef enum VkMemoryPropertyFlagBits {
    VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
    VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
    VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
  // Provided by VK_VERSION_1_1
    VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020,
  // Provided by VK_AMD_device_coherent_memory
    VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD = 0x00000040,
  // Provided by VK_AMD_device_coherent_memory
    VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD = 0x00000080,
  // Provided by VK_NV_external_memory_rdma
    VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV = 0x00000100,
} VkMemoryPropertyFlagBits;

Description

For any memory allocated with both the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT and the VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD, host or device accesses also perform automatic memory domain transfer operations, such that writes are always automatically available and visible to both host and device memory domains.

Note

Device coherence is a useful property for certain debugging use cases (e.g. crash analysis, where performing separate coherence actions could mean values are not reported correctly). However, device coherent accesses may be slower than equivalent accesses without device coherence, particularly if they are also device uncached. For device uncached memory in particular, repeated accesses to the same or neighboring memory locations over a short time period (e.g. within a frame) may be slower than it would be for the equivalent cached memory type. As such, it is generally inadvisable to use device coherent or device uncached memory except when really needed.

Note

Between the memory types which support VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT on any particular implementation, there may be different properties which cater to different memory access patterns.

VK_MEMORY_PROPERTY_HOST_CACHED_BIT is expected to be used when the host performs any read or read-modify-write operations on the memory. The typical scenario for this is when data flows from device to host. A typical implementation of this is normal malloc-like memory.

VK_MEMORY_PROPERTY_HOST_COHERENT_BIT without VK_MEMORY_PROPERTY_HOST_CACHED_BIT is expected for upload operations where data flows from host to device, for purposes of initializing resources or similar. A typical implementation of this memory type is write-combined memory which avoids polluting caches on the host, but has severe performance penalties if it is read from. The host is also expected to write complete cache lines for maximum performance.

Some implementations may not support uncached memory types. The expectation is that applications will end up using a memory type that support VK_MEMORY_PROPERTY_HOST_COHERENT_BIT and VK_MEMORY_PROPERTY_HOST_CACHED_BIT together. Either way, applications are expected to look for the first memory type which supports VK_MEMORY_PROPERTY_HOST_COHERENT_BIT and use that. On VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU with a unified memory architecture, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT is less of a concern since all memory is effectively device-local, but on VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, there may be a distinction between a VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT memory type which is additionally VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT or not.

On discrete GPUs, using VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, and VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT together is intended for small uploads to device memory which is optimized for fast device access without the need to go through a separate copy operation. Also known as BAR on PCI-e platforms. Peak write performance may be lower than system memory, and is not recommended for large uploads to the device. Common use cases for this type may be updating descriptors in a descriptor heap with vkWriteResourceDescriptorsEXT and vkWriteSamplerDescriptorsEXT, updating descriptors in a descriptor buffer with vkGetDescriptorEXT, or writing uniform buffer data.

Some implementations may support host visible types which are VK_MEMORY_PROPERTY_HOST_CACHED_BIT, where some types support VK_MEMORY_PROPERTY_HOST_COHERENT_BIT alongside CACHED, and some types which do not support VK_MEMORY_PROPERTY_HOST_COHERENT_BIT in combination with CACHED. Unless coherency is required by the application’s usage patterns, the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT supporting type is likely to be less optimal. If an application only looks for the CACHED property, it must come before the CACHED | COHERENT memory type in the memory types list, so this suggestion will be followed by default.

See Also

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

SPDX-License-Identifier: CC-BY-4.0