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 @@ Advanced data uploading
// [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
@@ -229,6 +230,7 @@ Advanced data uploading
myDataSize); // size
vkCmdCopyBuffer(cmdBuf, stagingBuf, buf, 1, &bufCopy);
}
+
vmaFlushAllocation
VkResult vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
Flushes memory of given allocation.
vmaGetAllocationMemoryProperties
void vmaGetAllocationMemoryProperties(VmaAllocator allocator, VmaAllocation allocation, VkMemoryPropertyFlags *pFlags)
Given an allocation, returns Property Flags of its memory type.
VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT
@ VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT
Definition: vk_mem_alloc.h:625

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 @@ 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