diff options
| author | 2019-02-08 23:21:53 -0500 | |
|---|---|---|
| committer | 2019-03-06 21:48:57 -0500 | |
| commit | aaa373585cd55bd03fcc589d2ad9f749e2cb99d4 (patch) | |
| tree | 1da617fd05d84d59910d585a6b01af2c89f3ed36 /src/video_core/gpu_synch.h | |
| parent | gpu: Move command processing to another thread. (diff) | |
| download | yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar.gz yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar.xz yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.zip | |
gpu: Refactor a/synchronous implementations into their own classes.
Diffstat (limited to 'src/video_core/gpu_synch.h')
| -rw-r--r-- | src/video_core/gpu_synch.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/video_core/gpu_synch.h b/src/video_core/gpu_synch.h new file mode 100644 index 000000000..658f683e2 --- /dev/null +++ b/src/video_core/gpu_synch.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | // Copyright 2019 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "video_core/gpu.h" | ||
| 8 | |||
| 9 | namespace VideoCore { | ||
| 10 | class RendererBase; | ||
| 11 | } // namespace VideoCore | ||
| 12 | |||
| 13 | namespace VideoCommon { | ||
| 14 | |||
| 15 | /// Implementation of GPU interface that runs the GPU synchronously | ||
| 16 | class GPUSynch : public Tegra::GPU { | ||
| 17 | public: | ||
| 18 | explicit GPUSynch(Core::System& system, VideoCore::RendererBase& renderer); | ||
| 19 | ~GPUSynch(); | ||
| 20 | |||
| 21 | void PushGPUEntries(Tegra::CommandList&& entries) override; | ||
| 22 | void SwapBuffers( | ||
| 23 | std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) override; | ||
| 24 | void FlushRegion(VAddr addr, u64 size) override; | ||
| 25 | void InvalidateRegion(VAddr addr, u64 size) override; | ||
| 26 | void FlushAndInvalidateRegion(VAddr addr, u64 size) override; | ||
| 27 | }; | ||
| 28 | |||
| 29 | } // namespace VideoCommon | ||