From ca16a746b9316daa2eca4a0e2f368e7aaadda9b2 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 3 Dec 2020 16:31:06 +0100 Subject: [PATCH] Minor tweaks to the public API surface --- .../Extensions/GraphicsDeviceExtensions.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs b/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs index 10e9e0ee..51a6ab80 100644 --- a/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs +++ b/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs @@ -36,7 +36,7 @@ namespace ComputeSharp public static ConstantBuffer AllocateConstantBuffer(this GraphicsDevice device, T[] array) where T : unmanaged { - return device.AllocateConstantBuffer(array.AsSpan()); + return device.AllocateConstantBuffer(array.AsSpan()); } /// @@ -44,10 +44,10 @@ namespace ComputeSharp /// /// The type of items to store in the buffer. /// The instance to use to allocate the buffer. - /// The input with the data to copy on the allocated buffer. - /// A constant instance with the contents of the input . + /// The input with the data to copy on the allocated buffer. + /// A constant instance with the contents of the input . [Pure] - public static ConstantBuffer AllocateConstantBuffer(this GraphicsDevice device, Span span) + public static ConstantBuffer AllocateConstantBuffer(this GraphicsDevice device, ReadOnlySpan span) where T : unmanaged { ConstantBuffer buffer = new(device, span.Length); @@ -100,7 +100,7 @@ namespace ComputeSharp public static ReadOnlyBuffer AllocateReadOnlyBuffer(this GraphicsDevice device, T[] array) where T : unmanaged { - return device.AllocateReadOnlyBuffer(array.AsSpan()); + return device.AllocateReadOnlyBuffer(array.AsSpan()); } /// @@ -108,10 +108,10 @@ namespace ComputeSharp /// /// The type of items to store in the buffer. /// The instance to use to allocate the buffer. - /// The input with the data to copy on the allocated buffer. - /// A read write instance with the contents of the input . + /// The input with the data to copy on the allocated buffer. + /// A read write instance with the contents of the input . [Pure] - public static ReadOnlyBuffer AllocateReadOnlyBuffer(this GraphicsDevice device, Span span) + public static ReadOnlyBuffer AllocateReadOnlyBuffer(this GraphicsDevice device, ReadOnlySpan span) where T : unmanaged { ReadOnlyBuffer buffer = new(device, span.Length); @@ -164,7 +164,7 @@ namespace ComputeSharp public static ReadWriteBuffer AllocateReadWriteBuffer(this GraphicsDevice device, T[] array) where T : unmanaged { - return device.AllocateReadWriteBuffer(array.AsSpan()); + return device.AllocateReadWriteBuffer(array.AsSpan()); } /// @@ -172,10 +172,10 @@ namespace ComputeSharp /// /// The type of items to store in the buffer. /// The instance to use to allocate the buffer. - /// The input with the data to copy on the allocated buffer. - /// A read write instance with the contents of the input . + /// The input with the data to copy on the allocated buffer. + /// A read write instance with the contents of the input . [Pure] - public static ReadWriteBuffer AllocateReadWriteBuffer(this GraphicsDevice device, Span span) + public static ReadWriteBuffer AllocateReadWriteBuffer(this GraphicsDevice device, ReadOnlySpan span) where T : unmanaged { ReadWriteBuffer buffer = new(device, span.Length); @@ -277,7 +277,7 @@ namespace ComputeSharp /// The input with the data to copy on the allocated texture. /// The width of the texture. /// The height of the texture. - /// A instance with the contents of the input span. + /// A instance with the contents of the input . [Pure] public static ReadOnlyTexture2D AllocateReadOnlyTexture2D(this GraphicsDevice device, ReadOnlySpan span, int width, int height) where T : unmanaged @@ -363,7 +363,7 @@ namespace ComputeSharp /// The input with the data to copy on the allocated texture. /// The width of the texture. /// The height of the texture. - /// A instance with the contents of the input span. + /// A instance with the contents of the input . [Pure] public static ReadWriteTexture2D AllocateReadWriteTexture2D(this GraphicsDevice device, ReadOnlySpan span, int width, int height) where T : unmanaged