VKMEMORYTYPE(3)

NAME
VkMemoryType - Structure specifying memory type

C SPECIFICATION

The VkMemoryType structure is defined as:

    typedef struct VkMemoryType {
        VkMemoryPropertyFlags    propertyFlags;
        uint32_t                 heapIndex;
    } VkMemoryType;

MEMBERS

    • heapIndex describes which memory heap this memory type corresponds to, and must be less than memoryHeapCount from the VkPhysicalDeviceMemoryProperties structure.

    • propertyFlags is a bitmask of properties for this memory type. The bits specified in propertyFlags are:

        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,
        } VkMemoryPropertyFlagBits;

        • if propertyFlags has the VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set, memory allocated with this type is the most efficient for device access. This property will only be set for memory types belonging to heaps with the VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set.

        • if propertyFlags has the VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit set, memory allocated with this type can be mapped using vkMapMemory so that it can be accessed on the host.

        • if propertyFlags has the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set, host cache management commands vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges are not needed to make host writes visible to the device or device writes visible to the host, respectively.

        • if propertyFlags has the VK_MEMORY_PROPERTY_HOST_CACHED_BIT bit set, memory allocated with this type is cached on the host. Host memory accesses to uncached memory are slower than to cached memory, however uncached memory is always host coherent.

        • if propertyFlags has the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set, the memory type only allows device access to the memory. Memory types must not have both VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT and VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set. Additionally, the object’s backing memory may be provided by the implementation lazily as specified in Lazily Allocated Memory.

DESCRIPTION

SEE ALSO

VkMemoryPropertyFlags, VkPhysicalDeviceMemoryProperties

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkMemoryType

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

COPYRIGHT

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

AUTHOR

Khronos Group
    Author.