![]() |
Vulkan SDK for Android 1.1.1
Mali Developer Center
|
The FenceManager keeps track of fences which in turn are used to keep track of GPU progress. More...
#include <fence_manager.hpp>
Public Member Functions | |
FenceManager (VkDevice device) | |
Constructor. More... | |
~FenceManager () | |
Destructor. | |
void | beginFrame () |
Begins the frame. Waits for GPU to trigger all outstanding fences. After begin frame returns, it is safe to reuse or delete resources which were used previously. More... | |
VkFence | requestClearedFence () |
Called internally by the Context whenever submissions to GPU happens. | |
unsigned | getActiveFenceCount () const |
Gets the number of fences which are inFlight on the GPU. More... | |
VkFence * | getActiveFences () |
Gets an array for the fences which are inFlight on the GPU. More... | |
The FenceManager keeps track of fences which in turn are used to keep track of GPU progress.
Whenever we submit work to the GPU, it is our responsibility to make sure that the GPU is done using our resources before we modify or delete them. To implement this, we therefore use VkFences to keep track of all vkQueueSubmits.
Definition at line 37 of file fence_manager.hpp.
MaliSDK::FenceManager::FenceManager | ( | VkDevice | device | ) |
void MaliSDK::FenceManager::beginFrame | ( | ) |
Begins the frame. Waits for GPU to trigger all outstanding fences. After begin frame returns, it is safe to reuse or delete resources which were used previously.
We wait for fences which completes N frames earlier, so we do not stall, waiting for all GPU work to complete before this returns.
Definition at line 38 of file fence_manager.cpp.
|
inline |
Gets the number of fences which are inFlight on the GPU.
Definition at line 62 of file fence_manager.hpp.
|
inline |
Gets an array for the fences which are inFlight on the GPU.
Definition at line 70 of file fence_manager.hpp.