diff options
Diffstat (limited to 'src/video_core/gpu_asynch.cpp')
| -rw-r--r-- | src/video_core/gpu_asynch.cpp | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/video_core/gpu_asynch.cpp b/src/video_core/gpu_asynch.cpp deleted file mode 100644 index 70a3d5738..000000000 --- a/src/video_core/gpu_asynch.cpp +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 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 "core/core.h" | ||
| 6 | #include "core/hardware_interrupt_manager.h" | ||
| 7 | #include "video_core/gpu_asynch.h" | ||
| 8 | #include "video_core/gpu_thread.h" | ||
| 9 | #include "video_core/renderer_base.h" | ||
| 10 | |||
| 11 | namespace VideoCommon { | ||
| 12 | |||
| 13 | GPUAsynch::GPUAsynch(Core::System& system) : GPU{system, true}, gpu_thread{system} {} | ||
| 14 | |||
| 15 | GPUAsynch::~GPUAsynch() = default; | ||
| 16 | |||
| 17 | void GPUAsynch::Start() { | ||
| 18 | gpu_thread.StartThread(*renderer, renderer->Context(), *dma_pusher); | ||
| 19 | cpu_context = renderer->GetRenderWindow().CreateSharedContext(); | ||
| 20 | cpu_context->MakeCurrent(); | ||
| 21 | } | ||
| 22 | |||
| 23 | void GPUAsynch::ObtainContext() { | ||
| 24 | cpu_context->MakeCurrent(); | ||
| 25 | } | ||
| 26 | |||
| 27 | void GPUAsynch::ReleaseContext() { | ||
| 28 | cpu_context->DoneCurrent(); | ||
| 29 | } | ||
| 30 | |||
| 31 | void GPUAsynch::PushGPUEntries(Tegra::CommandList&& entries) { | ||
| 32 | gpu_thread.SubmitList(std::move(entries)); | ||
| 33 | } | ||
| 34 | |||
| 35 | void GPUAsynch::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { | ||
| 36 | gpu_thread.SwapBuffers(framebuffer); | ||
| 37 | } | ||
| 38 | |||
| 39 | void GPUAsynch::FlushRegion(VAddr addr, u64 size) { | ||
| 40 | gpu_thread.FlushRegion(addr, size); | ||
| 41 | } | ||
| 42 | |||
| 43 | void GPUAsynch::InvalidateRegion(VAddr addr, u64 size) { | ||
| 44 | gpu_thread.InvalidateRegion(addr, size); | ||
| 45 | } | ||
| 46 | |||
| 47 | void GPUAsynch::FlushAndInvalidateRegion(VAddr addr, u64 size) { | ||
| 48 | gpu_thread.FlushAndInvalidateRegion(addr, size); | ||
| 49 | } | ||
| 50 | |||
| 51 | void GPUAsynch::TriggerCpuInterrupt(const u32 syncpoint_id, const u32 value) const { | ||
| 52 | auto& interrupt_manager = system.InterruptManager(); | ||
| 53 | interrupt_manager.GPUInterruptSyncpt(syncpoint_id, value); | ||
| 54 | } | ||
| 55 | |||
| 56 | void GPUAsynch::WaitIdle() const { | ||
| 57 | gpu_thread.WaitIdle(); | ||
| 58 | } | ||
| 59 | |||
| 60 | void GPUAsynch::OnCommandListEnd() { | ||
| 61 | gpu_thread.OnCommandListEnd(); | ||
| 62 | } | ||
| 63 | |||
| 64 | } // namespace VideoCommon | ||