summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_scheduler.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-01-07 17:56:31 +0100
committerLiam <byteslice@airmail.cc>2023-01-07 20:35:11 +0100
commitc19c8ac92c4554dd1189ebb8d03a7adb79c9980a (patch)
treeef215a403794e4b8fccf9255f1fafa2dc26d94d2 /src/video_core/renderer_vulkan/vk_scheduler.h
parentMerge pull request #9570 from liamwhite/less-clock-boost (diff)
downloadyuzu-c19c8ac92c4554dd1189ebb8d03a7adb79c9980a.tar
yuzu-c19c8ac92c4554dd1189ebb8d03a7adb79c9980a.tar.gz
yuzu-c19c8ac92c4554dd1189ebb8d03a7adb79c9980a.tar.bz2
yuzu-c19c8ac92c4554dd1189ebb8d03a7adb79c9980a.tar.lz
yuzu-c19c8ac92c4554dd1189ebb8d03a7adb79c9980a.tar.xz
yuzu-c19c8ac92c4554dd1189ebb8d03a7adb79c9980a.tar.zst
yuzu-c19c8ac92c4554dd1189ebb8d03a7adb79c9980a.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_scheduler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.h b/src/video_core/renderer_vulkan/vk_scheduler.h
index 3858c506c..bd4cb0f7e 100644
--- a/src/video_core/renderer_vulkan/vk_scheduler.h
+++ b/src/video_core/renderer_vulkan/vk_scheduler.h
@@ -5,6 +5,7 @@
#include <condition_variable>
#include <cstddef>
+#include <functional>
#include <memory>
#include <thread>
#include <utility>
@@ -66,6 +67,11 @@ public:
query_cache = &query_cache_;
}
+ // Registers a callback to perform on queue submission.
+ void RegisterOnSubmit(std::function<void()>&& func) {
+ on_submit = std::move(func);
+ }
+
/// Send work to a separate thread.
template <typename T>
void Record(T&& command) {
@@ -216,6 +222,7 @@ private:
vk::CommandBuffer current_cmdbuf;
std::unique_ptr<CommandChunk> chunk;
+ std::function<void()> on_submit;
State state;