diff options
| author | bunnei <bunneidev@gmail.com> | 2020-10-26 23:02:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-26 23:02:42 -0700 |
| commit | d33399e1f46a10490b586196c6d0db0f04be4206 (patch) | |
| tree | 8b2e1d98bf832049936ab931fc3a120e70bc36c2 /src/video_core/gpu_synch.cpp | |
| parent | c7f32931ee46ef18ed8f9d432a687ca1fa1e974e (diff) | |
| parent | eb67a45ca82bc01ac843c853fd3c17f2a90e0250 (diff) | |
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.cpp | 18 |
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 @@ namespace VideoCommon { -GPUSynch::GPUSynch(Core::System& system) : GPU{system, false} {} +GPUSynch::GPUSynch(Core::System& system, bool use_nvdec) : GPU{system, false, use_nvdec} {} GPUSynch::~GPUSynch() = default; @@ -26,6 +26,22 @@ void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) { dma_pusher->DispatchCalls(); } +void GPUSynch::PushCommandBuffer(Tegra::ChCommandHeaderList& entries) { + if (!use_nvdec) { + return; + } + // This condition fires when a video stream ends, clears all intermediary data + if (entries[0].raw == 0xDEADB33F) { + cdma_pusher.reset(); + return; + } + if (!cdma_pusher) { + cdma_pusher = std::make_unique<Tegra::CDmaPusher>(*this); + } + cdma_pusher->Push(std::move(entries)); + cdma_pusher->DispatchCalls(); +} + void GPUSynch::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { renderer->SwapBuffers(framebuffer); } |
