From 35f68c1b31e1664a37df89b950d6e22c81210e8e Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Mon, 27 May 2024 10:38:00 -0400 Subject: [PATCH] Implement Texture CopyTo --- src/Ryujinx.Graphics.Metal/Pipeline.cs | 10 ++++++++++ src/Ryujinx.Graphics.Metal/Texture.cs | 8 +------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/Pipeline.cs b/src/Ryujinx.Graphics.Metal/Pipeline.cs index 699bd155fb..504a2d5cf1 100644 --- a/src/Ryujinx.Graphics.Metal/Pipeline.cs +++ b/src/Ryujinx.Graphics.Metal/Pipeline.cs @@ -191,6 +191,16 @@ namespace Ryujinx.Graphics.Metal dst.Dispose(); } + public void BlitColor( + ITexture src, + ITexture dst, + Extents2D srcRegion, + Extents2D dstRegion, + bool linearFilter) + { + _helperShader.BlitColor(src, dst, srcRegion, dstRegion, linearFilter); + } + public void Barrier() { diff --git a/src/Ryujinx.Graphics.Metal/Texture.cs b/src/Ryujinx.Graphics.Metal/Texture.cs index 63da29966a..79699adea1 100644 --- a/src/Ryujinx.Graphics.Metal/Texture.cs +++ b/src/Ryujinx.Graphics.Metal/Texture.cs @@ -149,13 +149,7 @@ namespace Ryujinx.Graphics.Metal public void CopyTo(ITexture destination, Extents2D srcRegion, Extents2D dstRegion, bool linearFilter) { - // var blitCommandEncoder = _pipeline.GetOrCreateBlitEncoder(); - // - // if (destination is Texture destinationTexture) - // { - // - // } - Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!"); + _pipeline.BlitColor(this, destination, srcRegion, dstRegion, linearFilter); } public void CopyTo(BufferRange range, int layer, int level, int stride)