summaryrefslogtreecommitdiff
path: root/src/video_core/gpu_synch.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2020-10-26 23:02:42 -0700
committerGravatar GitHub2020-10-26 23:02:42 -0700
commitd33399e1f46a10490b586196c6d0db0f04be4206 (patch)
tree8b2e1d98bf832049936ab931fc3a120e70bc36c2 /src/video_core/gpu_synch.cpp
parentMerge pull request #4832 from bunnei/cpu-manager-microprofile-fix (diff)
parentvideo_core: NVDEC Implementation (diff)
downloadyuzu-d33399e1f46a10490b586196c6d0db0f04be4206.tar.gz
yuzu-d33399e1f46a10490b586196c6d0db0f04be4206.tar.xz
yuzu-d33399e1f46a10490b586196c6d0db0f04be4206.zip
Merge pull request #4729 from ameerj/nvdec-prod
video_core: NVDEC Implementation
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}