Texture 2d copy profiled

This commit is contained in:
Andy Adshead 2019-02-02 00:58:38 +00:00
commit 414a10ac53
2 changed files with 14 additions and 0 deletions

View file

@ -1,6 +1,7 @@
using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Gal;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;
using Ryujinx.Profiler;
namespace Ryujinx.Graphics.Graphics3d namespace Ryujinx.Graphics.Graphics3d
{ {
@ -40,6 +41,8 @@ namespace Ryujinx.Graphics.Graphics3d
private void TextureCopy(NvGpuVmm Vmm) private void TextureCopy(NvGpuVmm Vmm)
{ {
Profile.Begin(Profiles.GPU.Engine2d.TextureCopy);
CopyOperation Operation = (CopyOperation)ReadRegister(NvGpuEngine2dReg.CopyOperation); CopyOperation Operation = (CopyOperation)ReadRegister(NvGpuEngine2dReg.CopyOperation);
int DstFormat = ReadRegister(NvGpuEngine2dReg.DstFormat); int DstFormat = ReadRegister(NvGpuEngine2dReg.DstFormat);
@ -138,6 +141,8 @@ namespace Ryujinx.Graphics.Graphics3d
DstBlitH); DstBlitH);
Vmm.IsRegionModified(DstKey, ImageUtils.GetSize(DstTexture), NvGpuBufferType.Texture); Vmm.IsRegionModified(DstKey, ImageUtils.GetSize(DstTexture), NvGpuBufferType.Texture);
Profile.End(Profiles.GPU.Engine2d.TextureCopy);
} }
private static GalMemoryLayout GetLayout(bool Linear) private static GalMemoryLayout GetLayout(bool Linear)

View file

@ -92,6 +92,15 @@ namespace Ryujinx.Profiler
public static class GPU public static class GPU
{ {
public static class Engine2d
{
public static ProfileConfig TextureCopy = new ProfileConfig()
{
Category = "GPU.Engine2D",
SessionGroup = "TextureCopy"
};
}
public static class Engine3d public static class Engine3d
{ {
public static ProfileConfig VertexEnd = new ProfileConfig() public static ProfileConfig VertexEnd = new ProfileConfig()