Track batch fences with the batches.

This commit is contained in:
Dr. Chat
2016-11-08 18:11:12 -06:00
parent 391b6e9bb7
commit 48f6ba747c
11 changed files with 255 additions and 108 deletions

View File

@@ -40,7 +40,7 @@ class CircularBuffer {
// Allocation usage fence. This allocation will be deleted when the fence
// becomes signaled.
std::shared_ptr<Fence> fence;
VkFence fence;
};
bool Initialize(VkDeviceMemory memory, VkDeviceSize offset);
@@ -59,7 +59,7 @@ class CircularBuffer {
// Acquires space to hold memory. This allocation is only freed when the fence
// reaches the signaled state.
Allocation* Acquire(VkDeviceSize length, std::shared_ptr<Fence> fence);
Allocation* Acquire(VkDeviceSize length, VkFence fence);
void Flush(Allocation* allocation);
// Clears all allocations, regardless of whether they've been consumed or not.