diff options
| author | 2019-03-07 10:41:53 -0500 | |
|---|---|---|
| committer | 2019-03-07 10:41:53 -0500 | |
| commit | 4f352833a5b94e900ed7afb3b84eeda1bb5fab3d (patch) | |
| tree | 48af4d722e551f55a117244f986c11e47e7b27e5 /src/video_core/gpu_asynch.cpp | |
| parent | Merge pull request #2149 from ReinUsesLisp/decoders-style (diff) | |
| parent | gpu_thread: Fix deadlock with threading idle state check. (diff) | |
| download | yuzu-4f352833a5b94e900ed7afb3b84eeda1bb5fab3d.tar.gz yuzu-4f352833a5b94e900ed7afb3b84eeda1bb5fab3d.tar.xz yuzu-4f352833a5b94e900ed7afb3b84eeda1bb5fab3d.zip | |
Merge pull request #2055 from bunnei/gpu-thread
Asynchronous GPU command processing
Diffstat (limited to 'src/video_core/gpu_asynch.cpp')
| -rw-r--r-- | src/video_core/gpu_asynch.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/video_core/gpu_asynch.cpp b/src/video_core/gpu_asynch.cpp new file mode 100644 index 000000000..ad0a747e3 --- /dev/null +++ b/src/video_core/gpu_asynch.cpp | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | // Copyright 2019 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "video_core/gpu_asynch.h" | ||
| 6 | #include "video_core/gpu_thread.h" | ||
| 7 | #include "video_core/renderer_base.h" | ||
| 8 | |||
| 9 | namespace VideoCommon { | ||
| 10 | |||
| 11 | GPUAsynch::GPUAsynch(Core::System& system, VideoCore::RendererBase& renderer) | ||
| 12 | : Tegra::GPU(system, renderer), gpu_thread{renderer, *dma_pusher} {} | ||
| 13 | |||
| 14 | GPUAsynch::~GPUAsynch() = default; | ||
| 15 | |||
| 16 | void GPUAsynch::PushGPUEntries(Tegra::CommandList&& entries) { | ||
| 17 | gpu_thread.SubmitList(std::move(entries)); | ||
| 18 | } | ||
| 19 | |||
| 20 | void GPUAsynch::SwapBuffers( | ||
| 21 | std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) { | ||
| 22 | gpu_thread.SwapBuffers(std::move(framebuffer)); | ||
| 23 | } | ||
| 24 | |||
| 25 | void GPUAsynch::FlushRegion(VAddr addr, u64 size) { | ||
| 26 | gpu_thread.FlushRegion(addr, size); | ||
| 27 | } | ||
| 28 | |||
| 29 | void GPUAsynch::InvalidateRegion(VAddr addr, u64 size) { | ||
| 30 | gpu_thread.InvalidateRegion(addr, size); | ||
| 31 | } | ||
| 32 | |||
| 33 | void GPUAsynch::FlushAndInvalidateRegion(VAddr addr, u64 size) { | ||
| 34 | gpu_thread.FlushAndInvalidateRegion(addr, size); | ||
| 35 | } | ||
| 36 | |||
| 37 | } // namespace VideoCommon | ||