From 58da814547194207accbd86f95de2c9b576bd539 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 14 Aug 2019 13:22:30 +0200 Subject: [PATCH] Added new HlslBuffer.SetData(T[]) overload --- src/ComputeSharp.Graphics/Buffers/Abstract/HlslBuffer{T}.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ComputeSharp.Graphics/Buffers/Abstract/HlslBuffer{T}.cs b/src/ComputeSharp.Graphics/Buffers/Abstract/HlslBuffer{T}.cs index bde98d3e..c344e728 100644 --- a/src/ComputeSharp.Graphics/Buffers/Abstract/HlslBuffer{T}.cs +++ b/src/ComputeSharp.Graphics/Buffers/Abstract/HlslBuffer{T}.cs @@ -39,6 +39,12 @@ namespace ComputeSharp.Graphics.Buffers.Abstract /// The input to write data to public abstract void GetData(Span span); + /// + /// Writes the contents of a given array to the current instance + /// + /// The input array to read data from + public void SetData(T[] array) => SetData(array.AsSpan()); + /// /// Writes the contents of a given to the current instance ///