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.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/video_core/gpu_synch.cpp b/src/video_core/gpu_synch.cpp
index 1ca47ddef..ecf7bbdf3 100644
--- a/src/video_core/gpu_synch.cpp
+++ b/src/video_core/gpu_synch.cpp
@@ -7,7 +7,7 @@
7 7
8namespace VideoCommon { 8namespace VideoCommon {
9 9
10GPUSynch::GPUSynch(Core::System& system) : GPU{system, false} {} 10GPUSynch::GPUSynch(Core::System& system, bool use_nvdec) : GPU{system, false, use_nvdec} {}
11 11
12GPUSynch::~GPUSynch() = default; 12GPUSynch::~GPUSynch() = default;
13 13
@@ -26,6 +26,22 @@ void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) {
26 dma_pusher->DispatchCalls(); 26 dma_pusher->DispatchCalls();
27} 27}
28 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
29void GPUSynch::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { 45void GPUSynch::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
30 renderer->SwapBuffers(framebuffer); 46 renderer->SwapBuffers(framebuffer);
31} 47}