diff options
| author | 2020-12-11 22:26:14 -0800 | |
|---|---|---|
| committer | 2020-12-28 16:33:48 -0800 | |
| commit | 14c825bd1c37b2444e858bf1a75fb77455b4eb52 (patch) | |
| tree | 60dfa8c299f4709d04ca652c8eb35e7f7b13ad89 /src/video_core/gpu_synch.cpp | |
| parent | hle: kernel: hle_ipc: Remove SleepClientThread. (diff) | |
| download | yuzu-14c825bd1c37b2444e858bf1a75fb77455b4eb52.tar.gz yuzu-14c825bd1c37b2444e858bf1a75fb77455b4eb52.tar.xz yuzu-14c825bd1c37b2444e858bf1a75fb77455b4eb52.zip | |
video_core: gpu: Refactor out synchronous/asynchronous GPU implementations.
- We must always use a GPU thread now, even with synchronous GPU.
Diffstat (limited to 'src/video_core/gpu_synch.cpp')
| -rw-r--r-- | src/video_core/gpu_synch.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/video_core/gpu_synch.cpp b/src/video_core/gpu_synch.cpp deleted file mode 100644 index 1e9d4b9b2..000000000 --- a/src/video_core/gpu_synch.cpp +++ /dev/null | |||
| @@ -1,61 +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 "video_core/gpu_synch.h" | ||
| 6 | #include "video_core/renderer_base.h" | ||
| 7 | |||
| 8 | namespace VideoCommon { | ||
| 9 | |||
| 10 | GPUSynch::GPUSynch(Core::System& system_, bool use_nvdec_) : GPU{system_, false, use_nvdec_} {} | ||
| 11 | |||
| 12 | GPUSynch::~GPUSynch() = default; | ||
| 13 | |||
| 14 | void GPUSynch::Start() {} | ||
| 15 | |||
| 16 | void GPUSynch::ObtainContext() { | ||
| 17 | renderer->Context().MakeCurrent(); | ||
| 18 | } | ||
| 19 | |||
| 20 | void GPUSynch::ReleaseContext() { | ||
| 21 | renderer->Context().DoneCurrent(); | ||
| 22 | } | ||
| 23 | |||
| 24 | void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) { | ||
| 25 | dma_pusher->Push(std::move(entries)); | ||
| 26 | dma_pusher->DispatchCalls(); | ||
| 27 | } | ||
| 28 | |||
| 29 | void GPUSynch::PushCommandBuffer(Tegra::ChCommandHeaderList& entries) { | ||
| 30 | if (!use_nvdec) { | ||
| 31 | return; | ||
| 32 | } | ||
| 33 | // This condition fires when a video stream ends, clears all intermediary data | ||
| 34 | if (entries[0].raw == 0xDEADB33F) { | ||
| 35 | cdma_pusher.reset(); | ||
| 36 | return; | ||
| 37 | } | ||
| 38 | if (!cdma_pusher) { | ||
| 39 | cdma_pusher = std::make_unique<Tegra::CDmaPusher>(*this); | ||
| 40 | } | ||
| 41 | cdma_pusher->Push(std::move(entries)); | ||
| 42 | cdma_pusher->DispatchCalls(); | ||
| 43 | } | ||
| 44 | |||
| 45 | void GPUSynch::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { | ||
| 46 | renderer->SwapBuffers(framebuffer); | ||
| 47 | } | ||
| 48 | |||
| 49 | void GPUSynch::FlushRegion(VAddr addr, u64 size) { | ||
| 50 | renderer->Rasterizer().FlushRegion(addr, size); | ||
| 51 | } | ||
| 52 | |||
| 53 | void GPUSynch::InvalidateRegion(VAddr addr, u64 size) { | ||
| 54 | renderer->Rasterizer().InvalidateRegion(addr, size); | ||
| 55 | } | ||
| 56 | |||
| 57 | void GPUSynch::FlushAndInvalidateRegion(VAddr addr, u64 size) { | ||
| 58 | renderer->Rasterizer().FlushAndInvalidateRegion(addr, size); | ||
| 59 | } | ||
| 60 | |||
| 61 | } // namespace VideoCommon | ||