Constant vk_mem_alloc::ffi::VmaAllocationCreateFlagBits_VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT
source · [−]pub const VmaAllocationCreateFlagBits_VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT: VmaAllocationCreateFlagBits = 1024;
Expand description
Requests possibility to map the allocation (using vmaMapMemory() or #VMA_ALLOCATION_CREATE_MAPPED_BIT).
- If you use #VMA_MEMORY_USAGE_AUTO or other
VMA_MEMORY_USAGE_AUTO*
value, you must use this flag to be able to map the allocation. Otherwise, mapping is incorrect. - If you use other value of #VmaMemoryUsage, this flag is ignored and mapping is always possible in memory types that are
HOST_VISIBLE
. This includes allocations created in \ref custom_memory_pools.
Declares that mapped memory will only be written sequentially, e.g. using memcpy()
or a loop writing number-by-number,
never read or accessed randomly, so a memory type can be selected that is uncached and write-combined.
\warning Violating this declaration may work correctly, but will likely be very slow.
Watch out for implicit reads introduced by doing e.g. pMappedData[i] += x;
Better prepare your data in a local variable and memcpy()
it to the mapped pointer all at once.