Vulkan: Simplify command buffer fence tracking

This commit is contained in:
Stenzek
2019-03-17 15:59:22 +10:00
parent f3fadd7302
commit 427dd45151
11 changed files with 138 additions and 208 deletions

View File

@ -34,7 +34,7 @@ public:
private:
bool AllocateBuffer();
void UpdateCurrentFencePosition();
void OnFenceSignaled(VkFence fence);
void UpdateGPUPosition();
// Waits for as many fences as needed to allocate num_bytes bytes from the buffer.
bool WaitForClearSpace(u32 num_bytes);
@ -50,7 +50,7 @@ private:
u8* m_host_pointer = nullptr;
// List of fences and the corresponding positions in the buffer
std::deque<std::pair<VkFence, u32>> m_tracked_fences;
std::deque<std::pair<u64, u32>> m_tracked_fences;
bool m_coherent_mapping = false;
};