diff options
Diffstat (limited to 'src/video_core/gpu_thread.h')
-rw-r--r-- | src/video_core/gpu_thread.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h index 8cd7db1c6..70acb2e79 100644 --- a/src/video_core/gpu_thread.h +++ b/src/video_core/gpu_thread.h @@ -4,10 +4,8 @@ #pragma once -#include <array> #include <atomic> #include <condition_variable> -#include <memory> #include <mutex> #include <optional> #include <thread> @@ -97,13 +95,13 @@ struct SynchState final { std::condition_variable frames_condition; void IncrementFramesCounter() { - std::lock_guard<std::mutex> lock{frames_mutex}; + std::lock_guard lock{frames_mutex}; ++queued_frame_count; } void DecrementFramesCounter() { { - std::lock_guard<std::mutex> lock{frames_mutex}; + std::lock_guard lock{frames_mutex}; --queued_frame_count; if (queued_frame_count) { @@ -115,7 +113,7 @@ struct SynchState final { void WaitForFrames() { { - std::lock_guard<std::mutex> lock{frames_mutex}; + std::lock_guard lock{frames_mutex}; if (!queued_frame_count) { return; } @@ -123,14 +121,14 @@ struct SynchState final { // Wait for the GPU to be idle (all commands to be executed) { - std::unique_lock<std::mutex> lock{frames_mutex}; + std::unique_lock lock{frames_mutex}; frames_condition.wait(lock, [this] { return !queued_frame_count; }); } } void SignalCommands() { { - std::unique_lock<std::mutex> lock{commands_mutex}; + std::unique_lock lock{commands_mutex}; if (queue.Empty()) { return; } @@ -140,7 +138,7 @@ struct SynchState final { } void WaitForCommands() { - std::unique_lock<std::mutex> lock{commands_mutex}; + std::unique_lock lock{commands_mutex}; commands_condition.wait(lock, [this] { return !queue.Empty(); }); } @@ -177,7 +175,6 @@ private: private: SynchState state; VideoCore::RendererBase& renderer; - Tegra::DmaPusher& dma_pusher; std::thread thread; std::thread::id thread_id; }; |