aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-06-29 14:32:02 -0300
committerGitHub <noreply@github.com>2021-06-29 19:32:02 +0200
commitfbb4019ed5c12c4a888c7b09db648ac595366896 (patch)
treea8be6bf5fc4f8b844683f1ef2ade588f3bb9bb0a /Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs
parent8cc872fb60ec1b825655ba8dba06cc978fcd7e66 (diff)
Initial support for separate GPU address spaces (#2394)
* Make GPU memory manager a member of GPU channel * Move physical memory instance to the memory manager, and the caches to the physical memory * PR feedback
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs
index d0570262..946d0dd5 100644
--- a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs
@@ -17,6 +17,8 @@ namespace Ryujinx.Graphics.Gpu.Engine
/// <param name="argument">Method call argument</param>
private void CopyTexture(GpuState state, int argument)
{
+ var memoryManager = state.Channel.MemoryManager;
+
var dstCopyTexture = state.Get<CopyTexture>(MethodOffset.CopyDstTexture);
var srcCopyTexture = state.Get<CopyTexture>(MethodOffset.CopySrcTexture);
@@ -80,7 +82,13 @@ namespace Ryujinx.Graphics.Gpu.Engine
srcX1 = 0;
}
- Texture srcTexture = TextureCache.FindOrCreateTexture(srcCopyTexture, offset, srcCopyTextureFormat, true, srcHint);
+ Texture srcTexture = memoryManager.Physical.TextureCache.FindOrCreateTexture(
+ memoryManager,
+ srcCopyTexture,
+ offset,
+ srcCopyTextureFormat,
+ true,
+ srcHint);
if (srcTexture == null)
{
@@ -101,7 +109,13 @@ namespace Ryujinx.Graphics.Gpu.Engine
dstCopyTextureFormat = dstCopyTexture.Format.Convert();
}
- Texture dstTexture = TextureCache.FindOrCreateTexture(dstCopyTexture, 0, dstCopyTextureFormat, srcTexture.ScaleMode == TextureScaleMode.Scaled, dstHint);
+ Texture dstTexture = memoryManager.Physical.TextureCache.FindOrCreateTexture(
+ memoryManager,
+ dstCopyTexture,
+ 0,
+ dstCopyTextureFormat,
+ srcTexture.ScaleMode == TextureScaleMode.Scaled,
+ dstHint);
if (dstTexture == null)
{