summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/video_core/renderer_vulkan/vk_resource_manager.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_resource_manager.h b/src/video_core/renderer_vulkan/vk_resource_manager.h
index 3a9683f95..d4cbc95a5 100644
--- a/src/video_core/renderer_vulkan/vk_resource_manager.h
+++ b/src/video_core/renderer_vulkan/vk_resource_manager.h
@@ -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.
};