aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs
diff options
context:
space:
mode:
authorjhorv <38920027+jhorv@users.noreply.github.com>2024-09-18 22:00:54 -0400
committerGitHub <noreply@github.com>2024-09-18 23:00:54 -0300
commit73f985d27ca0c85f053e8b9494ba83a6c4d3afbf (patch)
tree4577f46b5da7fee66e780419d2c8f406bbae45ad /src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs
parentef81658fbd5b2aa23bf7e71b22a636da9a16c67b (diff)
Replace passing by IMemoryOwner<byte> with passing by concrete MemoryOwner<byte> (#7171)
* refactor(perf): pass MemoryOwner<byte> around as itself rather than IMemoryOwner<byte> * fix(perf): get span via MemoryOwner<byte>.Span property instead of through Memory property * fix: incorrect comment change
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs b/src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs
index bc1a5096..073eee2c 100644
--- a/src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs
+++ b/src/Ryujinx.Graphics.Vulkan/TextureBuffer.cs
@@ -1,7 +1,7 @@
+using Ryujinx.Common.Memory;
using Ryujinx.Graphics.GAL;
using Silk.NET.Vulkan;
using System;
-using System.Buffers;
using System.Collections.Generic;
using Format = Ryujinx.Graphics.GAL.Format;
using VkFormat = Silk.NET.Vulkan.Format;
@@ -84,20 +84,20 @@ namespace Ryujinx.Graphics.Vulkan
}
/// <inheritdoc/>
- public void SetData(IMemoryOwner<byte> data)
+ public void SetData(MemoryOwner<byte> data)
{
- _gd.SetBufferData(_bufferHandle, _offset, data.Memory.Span);
+ _gd.SetBufferData(_bufferHandle, _offset, data.Span);
data.Dispose();
}
/// <inheritdoc/>
- public void SetData(IMemoryOwner<byte> data, int layer, int level)
+ public void SetData(MemoryOwner<byte> data, int layer, int level)
{
throw new NotSupportedException();
}
/// <inheritdoc/>
- public void SetData(IMemoryOwner<byte> data, int layer, int level, Rectangle<int> region)
+ public void SetData(MemoryOwner<byte> data, int layer, int level, Rectangle<int> region)
{
throw new NotSupportedException();
}