aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/NvGpu.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-12-03 00:38:47 -0200
committerGitHub <noreply@github.com>2018-12-03 00:38:47 -0200
commitc86aacde76b5f8e503e2b412385c8491ecc86b3b (patch)
tree8e4737422fba15199c1a6ce7c6345996c0e907b5 /Ryujinx.Graphics/NvGpu.cs
parentad00fd02442cf9c0f00c4562635738042b521efa (diff)
NVDEC implementation using FFmpeg (#443)
* Initial nvdec implementation using FFmpeg * Fix swapped channels on the video decoder and the G8R8 texture format * Fix texture samplers not being set properly (regression) * Rebased * Remove unused code introduced on the rebase * Add support for RGBA8 output format on the video image composer * Correct spacing * Some fixes for rebase and other tweaks * Allow size mismatch on frame copy * Get rid of GetHostAddress calls on VDec
Diffstat (limited to 'Ryujinx.Graphics/NvGpu.cs')
-rw-r--r--Ryujinx.Graphics/NvGpu.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/NvGpu.cs b/Ryujinx.Graphics/NvGpu.cs
index 6989be98..3fd91f74 100644
--- a/Ryujinx.Graphics/NvGpu.cs
+++ b/Ryujinx.Graphics/NvGpu.cs
@@ -1,4 +1,8 @@
using Ryujinx.Graphics.Gal;
+using Ryujinx.Graphics.Graphics3d;
+using Ryujinx.Graphics.Memory;
+using Ryujinx.Graphics.VDec;
+using Ryujinx.Graphics.Vic;
namespace Ryujinx.Graphics
{
@@ -16,6 +20,10 @@ namespace Ryujinx.Graphics
internal NvGpuEngineM2mf EngineM2mf { get; private set; }
internal NvGpuEngineP2mf EngineP2mf { get; private set; }
+ private CdmaProcessor CdmaProcessor;
+ internal VideoDecoder VideoDecoder { get; private set; }
+ internal VideoImageComposer VideoImageComposer { get; private set; }
+
public NvGpu(IGalRenderer Renderer)
{
this.Renderer = Renderer;
@@ -29,6 +37,26 @@ namespace Ryujinx.Graphics
Engine3d = new NvGpuEngine3d(this);
EngineM2mf = new NvGpuEngineM2mf(this);
EngineP2mf = new NvGpuEngineP2mf(this);
+
+ CdmaProcessor = new CdmaProcessor(this);
+ VideoDecoder = new VideoDecoder(this);
+ VideoImageComposer = new VideoImageComposer(this);
+ }
+
+ public void PushCommandBuffer(NvGpuVmm Vmm, int[] CmdBuffer)
+ {
+ lock (CdmaProcessor)
+ {
+ CdmaProcessor.PushCommands(Vmm, CmdBuffer);
+ }
+ }
+
+ public void UninitializeVideoDecoder()
+ {
+ lock (CdmaProcessor)
+ {
+ FFmpegWrapper.Uninitialize();
+ }
}
}
} \ No newline at end of file