summaryrefslogtreecommitdiff
path: root/src/video_core/gpu_synch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/gpu_synch.cpp')
-rw-r--r--src/video_core/gpu_synch.cpp61
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
8namespace VideoCommon {
9
10GPUSynch::GPUSynch(Core::System& system_, bool use_nvdec_) : GPU{system_, false, use_nvdec_} {}
11
12GPUSynch::~GPUSynch() = default;
13
14void GPUSynch::Start() {}
15
16void GPUSynch::ObtainContext() {
17 renderer->Context().MakeCurrent();
18}
19
20void GPUSynch::ReleaseContext() {
21 renderer->Context().DoneCurrent();
22}
23
24void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) {
25 dma_pusher->Push(std::move(entries));
26 dma_pusher->DispatchCalls();
27}
28
29void 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
45void GPUSynch::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
46 renderer->SwapBuffers(framebuffer);
47}
48
49void GPUSynch::FlushRegion(VAddr addr, u64 size) {
50 renderer->Rasterizer().FlushRegion(addr, size);
51}
52
53void GPUSynch::InvalidateRegion(VAddr addr, u64 size) {
54 renderer->Rasterizer().InvalidateRegion(addr, size);
55}
56
57void GPUSynch::FlushAndInvalidateRegion(VAddr addr, u64 size) {
58 renderer->Rasterizer().FlushAndInvalidateRegion(addr, size);
59}
60
61} // namespace VideoCommon