Merge pull request #39 from Sergio0694/feature_netstandard20

.NET Standard 2.0
このコミットが含まれているのは:
Sergio Pedri authored and GitHub committed 2019-08-28 21:28:30 +02:00
コミット 4028a1cd64
6ファイル変更
+29 -13

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

+5 -1
ファイルの表示
@@ -1,7 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
</ItemGroup>
</Project>
+18 -9
ファイルの表示
@@ -35,10 +35,13 @@ 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 ConstantBuffer<T> AllocateConstantBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
public static unsafe ConstantBuffer<T> AllocateConstantBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
{
Span<T> span = MemoryMarshal.CreateSpan(ref array[0, 0], array.Length);
return device.AllocateConstantBuffer(span);
fixed (T* p = array)
{
Span<T> span = new Span<T>(p, array.Length);
return device.AllocateConstantBuffer(span);
}
}
/// <summary>
@@ -112,10 +115,13 @@ 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 ReadOnlyBuffer<T> AllocateReadOnlyBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
public static unsafe ReadOnlyBuffer<T> AllocateReadOnlyBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
{
Span<T> span = MemoryMarshal.CreateSpan(ref array[0, 0], array.Length);
return device.AllocateReadOnlyBuffer(span);
fixed (T* p = array)
{
Span<T> span = new Span<T>(p, array.Length);
return device.AllocateReadOnlyBuffer(span);
}
}
/// <summary>
@@ -189,10 +195,13 @@ 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 ReadWriteBuffer<T> AllocateReadWriteBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
public static unsafe ReadWriteBuffer<T> AllocateReadWriteBuffer<T>(this GraphicsDevice device, T[,] array) where T : unmanaged
{
Span<T> span = MemoryMarshal.CreateSpan(ref array[0, 0], array.Length);
return device.AllocateReadWriteBuffer(span);
fixed (T* p = array)
{
Span<T> span = new Span<T>(p, array.Length);
return device.AllocateReadWriteBuffer(span);
}
}
/// <summary>
+2 -1
ファイルの表示
@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</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>
+1 -1
ファイルの表示
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+1 -1
ファイルの表示
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
+2
ファイルの表示
@@ -17,6 +17,8 @@
<repository type="git" url="https://github.com/Sergio0694/ComputeSharp.git" branch="master" commit="25aaf474ea73096dc7da8086d2b1748d43200436" />
<dependencies>
<dependency id="Microsoft.Windows.SDK.Contracts" version="10.0.18362.2002-preview" />
<dependency id="System.Numerics.Vectors" version="4.5.0" />
<dependency id="System.Memory" version="4.5.3" />
<dependency id="System.Runtime.CompilerServices.Unsafe" version="4.6.0-preview8.19405.3" />
<dependency id="Vortice.DirectX.Direct3D12" version="1.0.0" />
<dependency id="ICSharpCode.Decompiler" version="5.0.0.5066-preview4" />