forked from ShuriZma/suyu
1
0
Fork 0

vk_resource_manager: Add entry to VKFence to test its usage

This commit is contained in:
ReinUsesLisp 2019-12-19 02:16:21 -03:00
parent ec983a2451
commit e41da22c8d
No known key found for this signature in database
GPG Key ID: 2DFC508897B39CFE
1 changed files with 8 additions and 0 deletions

View File

@ -124,6 +124,14 @@ public:
void OnFenceRemoval(VKFence* signaling_fence) override;
/**
* Do not use it paired with Watch. Use TryWatch instead.
* Returns true when the watch is free.
*/
bool IsUsed() const {
return fence != nullptr;
}
private:
VKFence* fence{}; ///< Fence watching this resource. nullptr when the watch is free.
};