diff --git a/src/ComputeSharp.Graphics/Buffers/Abstract/Buffer{T}.cs b/src/ComputeSharp.Graphics/Buffers/Abstract/Buffer{T}.cs index f3dc3b27..db6884e5 100644 --- a/src/ComputeSharp.Graphics/Buffers/Abstract/Buffer{T}.cs +++ b/src/ComputeSharp.Graphics/Buffers/Abstract/Buffer{T}.cs @@ -121,6 +121,20 @@ namespace ComputeSharp.Graphics.Buffers.Abstract return data; } + /// + /// Reads the contents of the current instance and writes them into a target array. + /// + /// The input array to write data to. + public void GetData(T[] destination) => GetData(destination.AsSpan(), 0, Length); + + /// + /// Reads the contents of the specified range from the current instance and writes them into a target array. + /// + /// The input array to write data to. + /// The offset to start reading data from. + /// The number of items to read. + public void GetData(T[] destination, int offset, int count) => GetData(destination.AsSpan(), offset, count); + /// /// Reads the contents of the current instance and writes them into a target . ///