From 923089a29825cad8159a63616d14dcbd7161cb3c Mon Sep 17 00:00:00 2001 From: gdkchan <gab.dark.100@gmail.com> Date: Thu, 25 Aug 2022 23:16:41 -0300 Subject: Fast path for Inline-to-Memory texture data transfers (#3610) * Fast path for Inline-to-Memory texture data transfers * Only do it for block linear textures to be on the safe side --- Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs') diff --git a/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs b/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs index 64d8aa3b..1e7d86ba 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs @@ -119,6 +119,12 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Resources _renderer.QueueCommand(); } + public void SetData(ReadOnlySpan<byte> data, int layer, int level, Rectangle<int> region) + { + _renderer.New<TextureSetDataSliceRegionCommand>().Set(Ref(this), Ref(data.ToArray()), layer, level, region); + _renderer.QueueCommand(); + } + public void SetStorage(BufferRange buffer) { _renderer.New<TextureSetStorageCommand>().Set(Ref(this), buffer); -- cgit v1.2.3-70-g09d2