diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-23 15:00:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 15:00:31 +0100 |
commit | ac3927074b190965bacbf99f70e8c5e95c953788 (patch) | |
tree | 324b95f908f83dde8b1b78cde131a8145f032508 /src/video_core | |
parent | Merge pull request #9964 from liamwhite/typed-address (diff) | |
parent | bounded_threadsafe_queue: Refactor Pop (diff) | |
download | yuzu-ac3927074b190965bacbf99f70e8c5e95c953788.tar yuzu-ac3927074b190965bacbf99f70e8c5e95c953788.tar.gz yuzu-ac3927074b190965bacbf99f70e8c5e95c953788.tar.bz2 yuzu-ac3927074b190965bacbf99f70e8c5e95c953788.tar.lz yuzu-ac3927074b190965bacbf99f70e8c5e95c953788.tar.xz yuzu-ac3927074b190965bacbf99f70e8c5e95c953788.tar.zst yuzu-ac3927074b190965bacbf99f70e8c5e95c953788.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/gpu_thread.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index f52f9e28f..3c5317777 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp @@ -31,9 +31,10 @@ static void RunThread(std::stop_token stop_token, Core::System& system, auto current_context = context.Acquire(); VideoCore::RasterizerInterface* const rasterizer = renderer.ReadRasterizer(); + CommandDataContainer next; + while (!stop_token.stop_requested()) { - CommandDataContainer next; - state.queue.Pop(next, stop_token); + state.queue.PopWait(next, stop_token); if (stop_token.stop_requested()) { break; } @@ -117,7 +118,7 @@ u64 ThreadManager::PushCommand(CommandData&& command_data, bool block) { std::unique_lock lk(state.write_lock); const u64 fence{++state.last_fence}; - state.queue.Push(CommandDataContainer(std::move(command_data), fence, block)); + state.queue.EmplaceWait(std::move(command_data), fence, block); if (block) { Common::CondvarWait(state.cv, lk, thread.get_stop_token(), [this, fence] { |