summaryrefslogtreecommitdiffstats
path: root/src/video_core/control/scheduler.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-09-01 05:45:22 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-10-06 21:00:54 +0200
commitca3db0d7c94a20668781830ff852dbf512598efb (patch)
treeedd20d669000e980169db27a896adc09078ceeaa /src/video_core/control/scheduler.cpp
parentstate_tracker: workaround channel setup for homebrew (diff)
downloadyuzu-ca3db0d7c94a20668781830ff852dbf512598efb.tar
yuzu-ca3db0d7c94a20668781830ff852dbf512598efb.tar.gz
yuzu-ca3db0d7c94a20668781830ff852dbf512598efb.tar.bz2
yuzu-ca3db0d7c94a20668781830ff852dbf512598efb.tar.lz
yuzu-ca3db0d7c94a20668781830ff852dbf512598efb.tar.xz
yuzu-ca3db0d7c94a20668781830ff852dbf512598efb.tar.zst
yuzu-ca3db0d7c94a20668781830ff852dbf512598efb.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/control/scheduler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/control/scheduler.cpp b/src/video_core/control/scheduler.cpp
index 733042690..f7cbe204e 100644
--- a/src/video_core/control/scheduler.cpp
+++ b/src/video_core/control/scheduler.cpp
@@ -3,6 +3,7 @@
#include <memory>
+#include "common/assert.h"
#include "video_core/control/channel_state.h"
#include "video_core/control/scheduler.h"
#include "video_core/gpu.h"
@@ -13,8 +14,9 @@ Scheduler::Scheduler(GPU& gpu_) : gpu{gpu_} {}
Scheduler::~Scheduler() = default;
void Scheduler::Push(s32 channel, CommandList&& entries) {
- std::unique_lock<std::mutex> lk(scheduling_guard);
+ std::unique_lock lk(scheduling_guard);
auto it = channels.find(channel);
+ ASSERT(it != channels.end());
auto channel_state = it->second;
gpu.BindChannel(channel_state->bind_id);
channel_state->dma_pusher->Push(std::move(entries));
@@ -23,7 +25,7 @@ void Scheduler::Push(s32 channel, CommandList&& entries) {
void Scheduler::DeclareChannel(std::shared_ptr<ChannelState> new_channel) {
s32 channel = new_channel->bind_id;
- std::unique_lock<std::mutex> lk(scheduling_guard);
+ std::unique_lock lk(scheduling_guard);
channels.emplace(channel, new_channel);
}