diff options
author | Liam <byteslice@airmail.cc> | 2024-01-26 16:10:21 -0500 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-09 09:20:53 -0500 |
commit | 0cb413c3d31b93ce347e997b9674c304094dab09 (patch) | |
tree | 959ef73963ea1e7975690d31eaf4ddc2f2ad6e19 /src/video_core/gpu.cpp | |
parent | 962c82540c304f909957776908aabcd261f2a7ba (diff) |
nvnflinger/gpu: implement applet capture
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r-- | src/video_core/gpu.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index f4a5d831c..8e663f2a8 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -347,6 +347,17 @@ struct GPU::Impl { WaitForSyncOperation(wait_fence); } + std::vector<u8> GetAppletCaptureBuffer() { + std::vector<u8> out; + + const auto wait_fence = + RequestSyncOperation([&] { out = renderer->GetAppletCaptureBuffer(); }); + gpu_thread.TickGPU(); + WaitForSyncOperation(wait_fence); + + return out; + } + GPU& gpu; Core::System& system; Host1x::Host1x& host1x; @@ -505,6 +516,10 @@ void GPU::RequestComposite(std::vector<Tegra::FramebufferConfig>&& layers, impl->RequestComposite(std::move(layers), std::move(fences)); } +std::vector<u8> GPU::GetAppletCaptureBuffer() { + return impl->GetAppletCaptureBuffer(); +} + u64 GPU::GetTicks() const { return impl->GetTicks(); } |