diff options
Diffstat (limited to 'Ryujinx.Graphics.GAL')
-rw-r--r-- | Ryujinx.Graphics.GAL/ITexture.cs | 7 | ||||
-rw-r--r-- | Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/Ryujinx.Graphics.GAL/ITexture.cs b/Ryujinx.Graphics.GAL/ITexture.cs index 7f46806c..4dc93303 100644 --- a/Ryujinx.Graphics.GAL/ITexture.cs +++ b/Ryujinx.Graphics.GAL/ITexture.cs @@ -1,3 +1,4 @@ +using Ryujinx.Common.Memory; using System; namespace Ryujinx.Graphics.GAL @@ -17,9 +18,9 @@ namespace Ryujinx.Graphics.GAL ReadOnlySpan<byte> GetData(); ReadOnlySpan<byte> GetData(int layer, int level); - void SetData(ReadOnlySpan<byte> data); - void SetData(ReadOnlySpan<byte> data, int layer, int level); - void SetData(ReadOnlySpan<byte> data, int layer, int level, Rectangle<int> region); + void SetData(SpanOrArray<byte> data); + void SetData(SpanOrArray<byte> data, int layer, int level); + void SetData(SpanOrArray<byte> data, int layer, int level, Rectangle<int> region); void SetStorage(BufferRange buffer); void Release(); } diff --git a/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs b/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs index 1e7d86ba..1267ab79 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Resources/ThreadedTexture.cs @@ -1,4 +1,5 @@ -using Ryujinx.Graphics.GAL.Multithreading.Commands.Texture; +using Ryujinx.Common.Memory; +using Ryujinx.Graphics.GAL.Multithreading.Commands.Texture; using Ryujinx.Graphics.GAL.Multithreading.Model; using System; @@ -107,19 +108,19 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Resources } } - public void SetData(ReadOnlySpan<byte> data) + public void SetData(SpanOrArray<byte> data) { _renderer.New<TextureSetDataCommand>().Set(Ref(this), Ref(data.ToArray())); _renderer.QueueCommand(); } - public void SetData(ReadOnlySpan<byte> data, int layer, int level) + public void SetData(SpanOrArray<byte> data, int layer, int level) { _renderer.New<TextureSetDataSliceCommand>().Set(Ref(this), Ref(data.ToArray()), layer, level); _renderer.QueueCommand(); } - public void SetData(ReadOnlySpan<byte> data, int layer, int level, Rectangle<int> region) + public void SetData(SpanOrArray<byte> data, int layer, int level, Rectangle<int> region) { _renderer.New<TextureSetDataSliceRegionCommand>().Set(Ref(this), Ref(data.ToArray()), layer, level, region); _renderer.QueueCommand(); |