Allocated staging buffers for asset upload. For each GPU, two buffers. One for asynchronous asset streaming with the transfer queue and another for immediate asset streaming with the graphics queue.

This commit is contained in:
2022-07-11 22:55:08 -07:00
parent 4bc44a8e52
commit 7f3ceebd5f
2 changed files with 67 additions and 0 deletions

View File

@@ -70,5 +70,17 @@ public:
std::vector<VkCommandBuffer> m_graphicsCommandBuffers;
std::vector<VkCommandBuffer> m_computeCommandBuffers;
VmaAllocator m_allocator;
// Staging buffer for uploading with the transfer queue
// This will be used for asynchronous asset streaming in the streamer thread.
VkBuffer m_streamingStagingBuffer;
VmaAllocation m_streamingStagingBufferAllocation;
size_t m_streamingStagingBufferSize;
// Staging buffer for uploading with the graphics queue
// This will be used for uploading assets procedurally generated while recording the graphics command buffer.
VkBuffer m_graphicsStagingBuffer;
VmaAllocation m_graphicsStagingBufferAllocation;
size_t m_graphicsStagingBufferSize;
private:
};