diff options
Diffstat (limited to 'src/video_core/gpu_thread.cpp')
| -rw-r--r-- | src/video_core/gpu_thread.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 4b8f58283..e27218b96 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -39,23 +39,23 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer, | |||
| 39 | CommandDataContainer next; | 39 | CommandDataContainer next; |
| 40 | while (state.is_running) { | 40 | while (state.is_running) { |
| 41 | next = state.queue.PopWait(); | 41 | next = state.queue.PopWait(); |
| 42 | if (const auto submit_list = std::get_if<SubmitListCommand>(&next.data)) { | 42 | if (auto* submit_list = std::get_if<SubmitListCommand>(&next.data)) { |
| 43 | dma_pusher.Push(std::move(submit_list->entries)); | 43 | dma_pusher.Push(std::move(submit_list->entries)); |
| 44 | dma_pusher.DispatchCalls(); | 44 | dma_pusher.DispatchCalls(); |
| 45 | } else if (const auto command_list = std::get_if<SubmitChCommandEntries>(&next.data)) { | 45 | } else if (auto* command_list = std::get_if<SubmitChCommandEntries>(&next.data)) { |
| 46 | // NVDEC | 46 | // NVDEC |
| 47 | cdma_pusher.Push(std::move(command_list->entries)); | 47 | cdma_pusher.Push(std::move(command_list->entries)); |
| 48 | cdma_pusher.DispatchCalls(); | 48 | cdma_pusher.DispatchCalls(); |
| 49 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { | 49 | } else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) { |
| 50 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); | 50 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); |
| 51 | } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) { | 51 | } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) { |
| 52 | renderer.Rasterizer().ReleaseFences(); | 52 | renderer.Rasterizer().ReleaseFences(); |
| 53 | } else if (std::holds_alternative<GPUTickCommand>(next.data)) { | 53 | } else if (std::holds_alternative<GPUTickCommand>(next.data)) { |
| 54 | system.GPU().TickWork(); | 54 | system.GPU().TickWork(); |
| 55 | } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { | 55 | } else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) { |
| 56 | renderer.Rasterizer().FlushRegion(data->addr, data->size); | 56 | renderer.Rasterizer().FlushRegion(flush->addr, flush->size); |
| 57 | } else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) { | 57 | } else if (const auto* invalidate = std::get_if<InvalidateRegionCommand>(&next.data)) { |
| 58 | renderer.Rasterizer().OnCPUWrite(data->addr, data->size); | 58 | renderer.Rasterizer().OnCPUWrite(invalidate->addr, invalidate->size); |
| 59 | } else if (std::holds_alternative<EndProcessingCommand>(next.data)) { | 59 | } else if (std::holds_alternative<EndProcessingCommand>(next.data)) { |
| 60 | return; | 60 | return; |
| 61 | } else { | 61 | } else { |
| @@ -65,7 +65,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer, | |||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | ThreadManager::ThreadManager(Core::System& system) : system{system} {} | 68 | ThreadManager::ThreadManager(Core::System& system_) : system{system_} {} |
| 69 | 69 | ||
| 70 | ThreadManager::~ThreadManager() { | 70 | ThreadManager::~ThreadManager() { |
| 71 | if (!thread.joinable()) { | 71 | if (!thread.joinable()) { |