diff options
Diffstat (limited to 'src/video_core/gpu_thread.cpp')
| -rw-r--r-- | src/video_core/gpu_thread.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 758a37f14..3efa3d8d0 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -31,24 +31,22 @@ static void RunThread(VideoCore::RendererBase& renderer, Tegra::DmaPusher& dma_p | |||
| 31 | 31 | ||
| 32 | CommandDataContainer next; | 32 | CommandDataContainer next; |
| 33 | while (state.is_running) { | 33 | while (state.is_running) { |
| 34 | while (!state.queue.Empty()) { | 34 | next = state.queue.PopWait(); |
| 35 | state.queue.Pop(next); | 35 | if (const auto submit_list = std::get_if<SubmitListCommand>(&next.data)) { |
| 36 | if (const auto submit_list = std::get_if<SubmitListCommand>(&next.data)) { | 36 | dma_pusher.Push(std::move(submit_list->entries)); |
| 37 | dma_pusher.Push(std::move(submit_list->entries)); | 37 | dma_pusher.DispatchCalls(); |
| 38 | dma_pusher.DispatchCalls(); | 38 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { |
| 39 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { | 39 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); |
| 40 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); | 40 | } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { |
| 41 | } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { | 41 | renderer.Rasterizer().FlushRegion(data->addr, data->size); |
| 42 | renderer.Rasterizer().FlushRegion(data->addr, data->size); | 42 | } else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) { |
| 43 | } else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) { | 43 | renderer.Rasterizer().InvalidateRegion(data->addr, data->size); |
| 44 | renderer.Rasterizer().InvalidateRegion(data->addr, data->size); | 44 | } else if (std::holds_alternative<EndProcessingCommand>(next.data)) { |
| 45 | } else if (std::holds_alternative<EndProcessingCommand>(next.data)) { | 45 | return; |
| 46 | return; | 46 | } else { |
| 47 | } else { | 47 | UNREACHABLE(); |
| 48 | UNREACHABLE(); | ||
| 49 | } | ||
| 50 | state.signaled_fence.store(next.fence); | ||
| 51 | } | 48 | } |
| 49 | state.signaled_fence.store(next.fence); | ||
| 52 | } | 50 | } |
| 53 | } | 51 | } |
| 54 | 52 | ||