From 66faae5b02e256f8803475564bdeadfa7027d1ee Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 23 Nov 2020 14:03:40 +0100 Subject: [PATCH] Added missing T[] overloads --- .../Buffers/Abstract/Buffer{T}.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 . ///