summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-12-19 06:16:21 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-12-19 20:31:34 +0100
commite41da22c8df960d85c6942ff21bf8f119b8ad0ed (patch)
tree23ee24a80e2f63754abd32ac9520685ff194f636
parentvk_reosurce_manager: Add assert for releasing fences (diff)
downloadyuzu-e41da22c8df960d85c6942ff21bf8f119b8ad0ed.tar
yuzu-e41da22c8df960d85c6942ff21bf8f119b8ad0ed.tar.gz
yuzu-e41da22c8df960d85c6942ff21bf8f119b8ad0ed.tar.bz2
yuzu-e41da22c8df960d85c6942ff21bf8f119b8ad0ed.tar.lz
yuzu-e41da22c8df960d85c6942ff21bf8f119b8ad0ed.tar.xz
yuzu-e41da22c8df960d85c6942ff21bf8f119b8ad0ed.tar.zst
yuzu-e41da22c8df960d85c6942ff21bf8f119b8ad0ed.zip
Diffstat (limited to '')
-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.
};