pub unsafe extern "C" fn vmaFlushAllocation(
    allocator: VmaAllocator,
    allocation: VmaAllocation,
    offset: DeviceSize,
    size: DeviceSize
) -> Result
Expand description

\brief Flushes memory of given allocation.

Calls vkFlushMappedMemoryRanges() for memory associated with given range of given allocation. It needs to be called after writing to a mapped memory for memory types that are not HOST_COHERENT. Unmap operation doesn’t do that automatically.

  • offset must be relative to the beginning of allocation.
  • size can be VK_WHOLE_SIZE. It means all memory from offset the the end of given allocation.
  • offset and size don’t have to be aligned. They are internally rounded down/up to multiply of nonCoherentAtomSize.
  • If size is 0, this call is ignored.
  • If memory type that the allocation belongs to is not HOST_VISIBLE or it is HOST_COHERENT, this call is ignored.

Warning! offset and size are relative to the contents of given allocation. If you mean whole allocation, you can pass 0 and VK_WHOLE_SIZE, respectively. Do not pass allocation’s offset as offset!!!

This function returns the VkResult from vkFlushMappedMemoryRanges if it is called, otherwise VK_SUCCESS.