Merge branch 'master' into feature-buffer-suballocation

This commit is contained in:
Adam Sawicki 2023-01-31 13:50:28 +01:00
commit 8113ea104f
2 changed files with 3 additions and 0 deletions

View File

@ -222,6 +222,7 @@ Advanced data uploading</h1>
<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 @@ Advanced data uploading</h1>
<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>

View File

@ -19429,6 +19429,7 @@ else
// [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