aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/control/scheduler.h
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-11-02 23:55:44 +0100
committercirakg <cirakg@cirakg.xyz>2026-11-02 23:55:44 +0100
commita931609f31672f782d2817f5764d65c00dea4dad (patch)
tree3cb5bd166d1a54a76969afd61c1db835c9cb293d /src/video_core/control/scheduler.h
parent3e10d48548a285172ea7cb1f94c58783e1d97754 (diff)
parent8362c44ff835d7be73d2adad9ce3e2d4467a6aeb (diff)
Merge branch 'nx2' into ldn/room-handshake
Diffstat (limited to 'src/video_core/control/scheduler.h')
-rw-r--r--src/video_core/control/scheduler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/control/scheduler.h b/src/video_core/control/scheduler.h
index 9a0f1b919f..b1aaf46b60 100644
--- a/src/video_core/control/scheduler.h
+++ b/src/video_core/control/scheduler.h
@@ -6,6 +6,7 @@
#pragma once
+#include <atomic>
#include <memory>
#include <mutex>
#include <vector>
@@ -30,6 +31,10 @@ public:
[[nodiscard]] bool HasPendingChannels() const {
return !pending_channels.empty();
}
+ /// HasPendingChannels for threads other than the GPU thread.
+ [[nodiscard]] bool HasPendingChannelsAnyThread() const {
+ return any_pending.load(std::memory_order_acquire);
+ }
void DeclareChannel(std::shared_ptr<ChannelState> new_channel);
@@ -39,6 +44,7 @@ private:
::Common::unordered_map<s32, std::shared_ptr<ChannelState>> channels;
std::mutex scheduling_guard;
std::vector<std::shared_ptr<ChannelState>> pending_channels; ///< Suspended on an acquire
+ std::atomic<bool> any_pending{};
};
} // namespace Control