aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Graphics3d/NvGpuEngineP2mf.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics/Graphics3d/NvGpuEngineP2mf.cs')
-rw-r--r--Ryujinx.Graphics/Graphics3d/NvGpuEngineP2mf.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/Ryujinx.Graphics/Graphics3d/NvGpuEngineP2mf.cs b/Ryujinx.Graphics/Graphics3d/NvGpuEngineP2mf.cs
index d24f2303..83ad0e70 100644
--- a/Ryujinx.Graphics/Graphics3d/NvGpuEngineP2mf.cs
+++ b/Ryujinx.Graphics/Graphics3d/NvGpuEngineP2mf.cs
@@ -1,6 +1,7 @@
using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture;
using System.Collections.Generic;
+using Ryujinx.Profiler;
namespace Ryujinx.Graphics.Graphics3d
{
@@ -54,7 +55,13 @@ namespace Ryujinx.Graphics.Graphics3d
{
if (_methods.TryGetValue(methCall.Method, out NvGpuMethod method))
{
+ ProfileConfig profile = Profiles.GPU.EngineP2mf.PushData;
+
+ profile.SessionItem = method.Method.Name;
+
+ Profile.Begin(profile);
method(vmm, methCall);
+ Profile.End(profile);
}
else
{
@@ -64,6 +71,8 @@ namespace Ryujinx.Graphics.Graphics3d
private void Execute(NvGpuVmm vmm, GpuMethodCall methCall)
{
+ Profile.Begin(Profiles.GPU.EngineP2mf.Execute);
+
//TODO: Some registers and copy modes are still not implemented.
int control = methCall.Argument;
@@ -97,6 +106,8 @@ namespace Ryujinx.Graphics.Graphics3d
_copySize = lineLengthIn * lineCount;
_buffer = new byte[_copySize];
+
+ Profile.End(Profiles.GPU.EngineP2mf.Execute);
}
private void PushData(NvGpuVmm vmm, GpuMethodCall methCall)
@@ -106,6 +117,8 @@ namespace Ryujinx.Graphics.Graphics3d
return;
}
+ Profile.Begin(Profiles.GPU.EngineP2mf.PushData);
+
for (int shift = 0; shift < 32 && _copyOffset < _copySize; shift += 8, _copyOffset++)
{
_buffer[_copyOffset] = (byte)(methCall.Argument >> shift);
@@ -137,6 +150,8 @@ namespace Ryujinx.Graphics.Graphics3d
_buffer = null;
}
+
+ Profile.End(Profiles.GPU.EngineP2mf.PushData);
}
private long MakeInt64From2xInt32(NvGpuEngineP2mfReg reg)
@@ -161,4 +176,4 @@ namespace Ryujinx.Graphics.Graphics3d
Registers[(int)reg] = value;
}
}
-} \ No newline at end of file
+}