Merge branch 'master' into feature-buffer-suballocation
diff --git a/docs/html/usage_patterns.html b/docs/html/usage_patterns.html
index 6fb1fa6..d47efee 100644
--- a/docs/html/usage_patterns.html
+++ b/docs/html/usage_patterns.html
@@ -222,6 +222,7 @@
 <div class="line"> </div>
 <div class="line">    <span class="comment">// [Executed in runtime]:</span></div>
 <div class="line">    memcpy(stagingAllocInfo.<a class="code hl_variable" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, myData, myDataSize);</div>
+<div class="line">    <a class="code hl_function" href="group__group__alloc.html#ga30c37c1eec6025f397be41644f48490f">vmaFlushAllocation</a>(allocator, stagingAlloc, 0, VK_WHOLE_SIZE);</div>
 <div class="line">    <span class="comment">//vkCmdPipelineBarrier: VK_ACCESS_HOST_WRITE_BIT --&gt; VK_ACCESS_TRANSFER_READ_BIT</span></div>
 <div class="line">    VkBufferCopy bufCopy = {</div>
 <div class="line">        0, <span class="comment">// srcOffset</span></div>
@@ -229,6 +230,7 @@
 <div class="line">        myDataSize); <span class="comment">// size</span></div>
 <div class="line">    vkCmdCopyBuffer(cmdBuf, stagingBuf, buf, 1, &amp;bufCopy);</div>
 <div class="line">}</div>
+<div class="ttc" id="agroup__group__alloc_html_ga30c37c1eec6025f397be41644f48490f"><div class="ttname"><a href="group__group__alloc.html#ga30c37c1eec6025f397be41644f48490f">vmaFlushAllocation</a></div><div class="ttdeci">VkResult vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)</div><div class="ttdoc">Flushes memory of given allocation.</div></div>
 <div class="ttc" id="agroup__group__alloc_html_ga571e87dd38e552249b56b1b0b982fad1"><div class="ttname"><a href="group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1">vmaGetAllocationMemoryProperties</a></div><div class="ttdeci">void vmaGetAllocationMemoryProperties(VmaAllocator allocator, VmaAllocation allocation, VkMemoryPropertyFlags *pFlags)</div><div class="ttdoc">Given an allocation, returns Property Flags of its memory type.</div></div>
 <div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:625</div></div>
 </div><!-- fragment --><h1><a class="anchor" id="usage_patterns_other_use_cases"></a>
diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h
index 88fb71f..a6f300e 100644
--- a/include/vk_mem_alloc.h
+++ b/include/vk_mem_alloc.h
@@ -19429,6 +19429,7 @@
 
     // [Executed in runtime]:
     memcpy(stagingAllocInfo.pMappedData, myData, myDataSize);
+    vmaFlushAllocation(allocator, stagingAlloc, 0, VK_WHOLE_SIZE);
     //vkCmdPipelineBarrier: VK_ACCESS_HOST_WRITE_BIT --> VK_ACCESS_TRANSFER_READ_BIT
     VkBufferCopy bufCopy = {
         0, // srcOffset