diff options
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/TextureView.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/TextureView.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Vulkan/TextureView.cs b/Ryujinx.Graphics.Vulkan/TextureView.cs index 264ecf5d..cd280d5f 100644 --- a/Ryujinx.Graphics.Vulkan/TextureView.cs +++ b/Ryujinx.Graphics.Vulkan/TextureView.cs @@ -531,7 +531,7 @@ namespace Ryujinx.Graphics.Vulkan return bitmap; } - public ReadOnlySpan<byte> GetData() + public PinnedSpan<byte> GetData() { BackgroundResource resources = _gd.BackgroundResources.Get(); @@ -539,15 +539,15 @@ namespace Ryujinx.Graphics.Vulkan { _gd.FlushAllCommands(); - return GetData(_gd.CommandBufferPool, resources.GetFlushBuffer()); + return PinnedSpan<byte>.UnsafeFromSpan(GetData(_gd.CommandBufferPool, resources.GetFlushBuffer())); } else { - return GetData(resources.GetPool(), resources.GetFlushBuffer()); + return PinnedSpan<byte>.UnsafeFromSpan(GetData(resources.GetPool(), resources.GetFlushBuffer())); } } - public ReadOnlySpan<byte> GetData(int layer, int level) + public PinnedSpan<byte> GetData(int layer, int level) { BackgroundResource resources = _gd.BackgroundResources.Get(); @@ -555,11 +555,11 @@ namespace Ryujinx.Graphics.Vulkan { _gd.FlushAllCommands(); - return GetData(_gd.CommandBufferPool, resources.GetFlushBuffer(), layer, level); + return PinnedSpan<byte>.UnsafeFromSpan(GetData(_gd.CommandBufferPool, resources.GetFlushBuffer(), layer, level)); } else { - return GetData(resources.GetPool(), resources.GetFlushBuffer(), layer, level); + return PinnedSpan<byte>.UnsafeFromSpan(GetData(resources.GetPool(), resources.GetFlushBuffer(), layer, level)); } } |