vulkan: use staging buffer for Buffer operations

This commit is contained in:
niki
2022-09-18 04:31:24 +02:00
parent bf6915ae73
commit 9a91cfd593
3 changed files with 84 additions and 10 deletions
+4 -1
View File
@@ -54,13 +54,16 @@ public:
ptrdiff_t getTexelBufferHandle() const override;
private:
// todo use a staging buffer for improved performance
bool zeroInitialize;
VkBuffer buffer = VK_NULL_HANDLE;
VkBuffer stagingBuffer = VK_NULL_HANDLE;
VkBufferView bufferView = VK_NULL_HANDLE;
Graphics *vgfx = nullptr;
VmaAllocator allocator;
VmaAllocation allocation;
VmaAllocation stagingAllocation;
VmaAllocationInfo allocInfo;
VmaAllocationInfo stagingAllocInfo;
BufferUsageFlags usageFlags;
};