Browse Source

vk_resource_manager: Add entry to VKFence to test its usage

nce_cpp
ReinUsesLisp 6 years ago
parent
commit
bb51f0809a
  1. 8
      src/video_core/renderer_vulkan/vk_resource_manager.h

8
src/video_core/renderer_vulkan/vk_resource_manager.h

@ -124,6 +124,14 @@ public:
void OnFenceRemoval(VKFence* signaling_fence) override; 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: private:
VKFence* fence{}; ///< Fence watching this resource. nullptr when the watch is free. VKFence* fence{}; ///< Fence watching this resource. nullptr when the watch is free.
}; };

Loading…
Cancel
Save