diff options
| author | bunnei <bunneidev@gmail.com> | 2019-03-07 10:41:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-07 10:41:53 -0500 |
| commit | 757fd21d98cd5ea566d66d9ef93de61001e65216 (patch) | |
| tree | 48af4d722e551f55a117244f986c11e47e7b27e5 /src/video_core/gpu_asynch.cpp | |
| parent | 72cfb6383c866eddb3dab1b1da9faceb349f426d (diff) | |
| parent | 01e509662de91fc7a09a8981655554f33281ff3f (diff) | |
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 0000000000..ad0a747e3b --- /dev/null +++ b/src/video_core/gpu_asynch.cpp @@ -0,0 +1,37 @@ +// Copyright 2019 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "video_core/gpu_asynch.h" +#include "video_core/gpu_thread.h" +#include "video_core/renderer_base.h" + +namespace VideoCommon { + +GPUAsynch::GPUAsynch(Core::System& system, VideoCore::RendererBase& renderer) + : Tegra::GPU(system, renderer), gpu_thread{renderer, *dma_pusher} {} + +GPUAsynch::~GPUAsynch() = default; + +void GPUAsynch::PushGPUEntries(Tegra::CommandList&& entries) { + gpu_thread.SubmitList(std::move(entries)); +} + +void GPUAsynch::SwapBuffers( + std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) { + gpu_thread.SwapBuffers(std::move(framebuffer)); +} + +void GPUAsynch::FlushRegion(VAddr addr, u64 size) { + gpu_thread.FlushRegion(addr, size); +} + +void GPUAsynch::InvalidateRegion(VAddr addr, u64 size) { + gpu_thread.InvalidateRegion(addr, size); +} + +void GPUAsynch::FlushAndInvalidateRegion(VAddr addr, u64 size) { + gpu_thread.FlushAndInvalidateRegion(addr, size); +} + +} // namespace VideoCommon |
