Backtracked on .NET Standard 2.0 downgrade

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-29 00:18:33 +02:00
1 親 3625df968e
コミット 5bfb7564cf
7ファイル変更
+22 -36

検索条件に一致するファイルはありません

+12 -18
ファイルの表示
@@ -35,13 +35,11 @@ namespace ComputeSharp
/// <returns>A constant <see cref="ConstantBuffer{T}"/> instance with the contents of the input 2D array</returns>
[Pure]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe ConstantBuffer<T> AllocateConstantBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
public static ConstantBuffer<T> AllocateConstantBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
{
fixed (T* p = array)
{
Span<T> span = new Span<T>(p, array.Length);
return device.AllocateConstantBuffer(span);
}
Span<T> span = MemoryMarshal.CreateSpan(ref array[0, 0], array.Length);
return device.AllocateConstantBuffer(span);
}
/// <summary>
@@ -115,13 +113,11 @@ namespace ComputeSharp
/// <returns>A read write <see cref="ReadOnlyBuffer{T}"/> instance with the contents of the input 2D array</returns>
[Pure]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe ReadOnlyBuffer<T> AllocateReadOnlyBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
public static ReadOnlyBuffer<T> AllocateReadOnlyBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
{
fixed (T* p = array)
{
Span<T> span = new Span<T>(p, array.Length);
return device.AllocateReadOnlyBuffer(span);
}
Span<T> span = MemoryMarshal.CreateSpan(ref array[0, 0], array.Length);
return device.AllocateReadOnlyBuffer(span);
}
/// <summary>
@@ -195,13 +191,11 @@ namespace ComputeSharp
/// <returns>A read write <see cref="ReadWriteBuffer{T}"/> instance with the contents of the input 2D array</returns>
[Pure]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe ReadWriteBuffer<T> AllocateReadWriteBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
public static ReadWriteBuffer<T> AllocateReadWriteBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
{
fixed (T* p = array)
{
Span<T> span = new Span<T>(p, array.Length);
return device.AllocateReadWriteBuffer(span);
}
Span<T> span = MemoryMarshal.CreateSpan(ref array[0, 0], array.Length);
return device.AllocateReadWriteBuffer(span);
}
/// <summary>
+1 -2
ファイルの表示
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Memory" Version="4.5.3" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.6.0-preview8.19405.3" />
<PackageReference Include="Vortice.DirectX.Direct3D12" Version="1.0.0" />
</ItemGroup>