diff options
Diffstat (limited to 'src/video_core/control/scheduler.cpp')
| -rw-r--r-- | src/video_core/control/scheduler.cpp | 6 |
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 @@ | |||
| 3 | 3 | ||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "common/assert.h" | ||
| 6 | #include "video_core/control/channel_state.h" | 7 | #include "video_core/control/channel_state.h" |
| 7 | #include "video_core/control/scheduler.h" | 8 | #include "video_core/control/scheduler.h" |
| 8 | #include "video_core/gpu.h" | 9 | #include "video_core/gpu.h" |
| @@ -13,8 +14,9 @@ Scheduler::Scheduler(GPU& gpu_) : gpu{gpu_} {} | |||
| 13 | Scheduler::~Scheduler() = default; | 14 | Scheduler::~Scheduler() = default; |
| 14 | 15 | ||
| 15 | void Scheduler::Push(s32 channel, CommandList&& entries) { | 16 | void Scheduler::Push(s32 channel, CommandList&& entries) { |
| 16 | std::unique_lock<std::mutex> lk(scheduling_guard); | 17 | std::unique_lock lk(scheduling_guard); |
| 17 | auto it = channels.find(channel); | 18 | auto it = channels.find(channel); |
| 19 | ASSERT(it != channels.end()); | ||
| 18 | auto channel_state = it->second; | 20 | auto channel_state = it->second; |
| 19 | gpu.BindChannel(channel_state->bind_id); | 21 | gpu.BindChannel(channel_state->bind_id); |
| 20 | channel_state->dma_pusher->Push(std::move(entries)); | 22 | channel_state->dma_pusher->Push(std::move(entries)); |
| @@ -23,7 +25,7 @@ void Scheduler::Push(s32 channel, CommandList&& entries) { | |||
| 23 | 25 | ||
| 24 | void Scheduler::DeclareChannel(std::shared_ptr<ChannelState> new_channel) { | 26 | void Scheduler::DeclareChannel(std::shared_ptr<ChannelState> new_channel) { |
| 25 | s32 channel = new_channel->bind_id; | 27 | s32 channel = new_channel->bind_id; |
| 26 | std::unique_lock<std::mutex> lk(scheduling_guard); | 28 | std::unique_lock lk(scheduling_guard); |
| 27 | channels.emplace(channel, new_channel); | 29 | channels.emplace(channel, new_channel); |
| 28 | } | 30 | } |
| 29 | 31 | ||