Centralize polyfills in a single ComputeSharp.NetStandard project

このコミットが含まれているのは:
Sergio Pedri committed 2023-01-15 15:33:54 +01:00
1 親 d7fba62884
コミット a09a817b5c
68ファイル変更
+106 -257

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

-14
ファイルの表示
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>3acacf03-6b20-40ba-b8ec-11ac1624d2c9</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>ComputeSharp.Core.NetStandard</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime.CompilerServices\RuntimeHelpers.cs" />
</ItemGroup>
</Project>
-13
ファイルの表示
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>3acacf03-6b20-40ba-b8ec-11ac1624d2c9</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="ComputeSharp.Core.NetStandard.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
-21
ファイルの表示
@@ -1,21 +0,0 @@
using System;
using System.Runtime.InteropServices;
namespace ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="RuntimeHelpers"/> on .NET 5.
/// </summary>
internal static class RuntimeHelpers
{
/// <summary>
/// Allocates some memory tied to the lifetime of a specific type.
/// </summary>
/// <param name="type">The type to associate the memory to.</param>
/// <param name="size">The size in byte of the memory to allocate.</param>
/// <returns>A pointer to the allocated memory.</returns>
public static IntPtr AllocateTypeAssociatedMemory(Type type, int size)
{
return Marshal.AllocHGlobal(size);
}
}
+1 -2
ファイルの表示
@@ -80,6 +80,5 @@
<Import Project="..\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems" Label="Shared" />
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Project="..\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems" Label="Shared" />
<Import Project="..\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
</Project>
+1 -1
ファイルの表示
@@ -27,5 +27,5 @@
</ItemGroup>
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Condition="'$(TargetFramework)' == 'netstandard2.0'" Project="..\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems" Label="Shared" />
<Import Condition="'$(TargetFramework)' == 'netstandard2.0'" Project="..\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
</Project>
+2 -2
ファイルの表示
@@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#pragma warning disable CS0660, CS0661
+2 -2
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#pragma warning disable CS0660, CS0661
+2 -2
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,9 +1,9 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#pragma warning disable CS0660, CS0661
+2 -2
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,11 +1,11 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,9 +1,9 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#pragma warning disable CS0660, CS0661
+2 -2
ファイルの表示
@@ -1,4 +1,4 @@
<#@include file="..\Intrinsics\Hlsl.MulOverloads.ttinclude" #>
<#@include file="..\Intrinsics\Hlsl.MulOverloads.ttinclude" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Text.RegularExpressions" #>
@@ -19,7 +19,7 @@ using System.Runtime.InteropServices;
}
#>
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#pragma warning disable CS0660, CS0661
+2 -2
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,10 +1,10 @@
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
+2 -2
ファイルの表示
@@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#pragma warning disable CS0660, CS0661
+2 -2
ファイルの表示
@@ -1,4 +1,4 @@
<#@include file="..\Intrinsics\Hlsl.MulOverloads.ttinclude" #>
<#@include file="..\Intrinsics\Hlsl.MulOverloads.ttinclude" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Text.RegularExpressions" #>
@@ -77,7 +77,7 @@ void GenerateVectorProperties(string typeName, int elementSize)
}
#>
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#nullable enable
-18
ファイルの表示
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>2608eb41-f98b-4be5-9f4d-68fed6115088</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>ComputeSharp.D2D1.NetStandard</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\BitOperations.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Math.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\RuntimeHelpers.cs" />
<Compile Include="$(MSBuildThisFileDirectory)..\ComputeSharp.NetStandard\System\Runtime\InteropServices\NativeMemory.cs" Link="System\Runtime\InteropServices\NativeMemory.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Text\EncodingExtensions.cs" />
</ItemGroup>
</Project>
-13
ファイルの表示
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>2608eb41-f98b-4be5-9f4d-68fed6115088</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="ComputeSharp.D2D1.NetStandard.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
-21
ファイルの表示
@@ -1,21 +0,0 @@
using System;
using System.Runtime.InteropServices;
namespace ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="RuntimeHelpers"/> on .NET 5.
/// </summary>
internal static class RuntimeHelpers
{
/// <summary>
/// Allocates some memory tied to the lifetime of a specific type.
/// </summary>
/// <param name="type">The type to associate the memory to.</param>
/// <param name="size">The size in byte of the memory to allocate.</param>
/// <returns>A pointer to the allocated memory.</returns>
public static IntPtr AllocateTypeAssociatedMemory(Type type, int size)
{
return Marshal.AllocHGlobal(size);
}
}
+3 -4
ファイルの表示
@@ -105,10 +105,9 @@
<Import Project="..\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems" Label="Shared" />
<Import Project="..\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems" Label="Shared" />
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Project="..\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems" Label="Shared" />
<!-- Shared project with TerraFX.Interop.Windows fork -->
<Import Project="..\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems" Label="Shared" />
<Import Project="..\ComputeSharp.D2D1.NetStandard\ComputeSharp.D2D1.NetStandard.projitems" Label="Shared" />
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Project="..\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
</Project>
-3
ファイルの表示
@@ -27,7 +27,4 @@
<!-- Shared project with the trimmed down fork of TerraFX.Interop.Windows with just the D3D bindings -->
<Import Project="..\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems" Label="Shared" />
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Condition="'$(TargetFramework)' == 'netstandard2.0'" Project="..\ComputeSharp.D2D1.NetStandard\ComputeSharp.D2D1.NetStandard.projitems" Label="Shared" />
</Project>
+1 -1
ファイルの表示
@@ -4,7 +4,7 @@ using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using Math = System.Math;
#else
using Math = ComputeSharp.D2D1.NetStandard.System.Math;
using Math = ComputeSharp.NetStandard.Math;
#endif
namespace ComputeSharp.D2D1.Extensions;
-3
ファイルの表示
@@ -5,9 +5,6 @@ using System.Buffers.Text;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
#if !NET6_0_OR_GREATER
using ComputeSharp.D2D1.NetStandard.System.Text;
#endif
namespace ComputeSharp.D2D1.Shaders.Interop.Buffers;
+1 -1
ファイルの表示
@@ -6,7 +6,7 @@ using System.Numerics;
#endif
using System.Runtime.CompilerServices;
#if !NET6_0_OR_GREATER
using BitOperations = ComputeSharp.D2D1.NetStandard.System.Buffers.BitOperations;
using BitOperations = ComputeSharp.NetStandard.BitOperations;
#endif
namespace ComputeSharp.D2D1.Shaders.Interop.Buffers;
-3
ファイルの表示
@@ -2,9 +2,6 @@ using System;
using System.Runtime.InteropServices;
using System.Text;
using ComputeSharp.D2D1.Helpers;
#if !NET6_0_OR_GREATER
using ComputeSharp.D2D1.NetStandard.System.Text;
#endif
namespace ComputeSharp.D2D1.Interop;
-3
ファイルの表示
@@ -2,9 +2,6 @@ using System;
using System.Buffers;
using System.Text;
using ComputeSharp.D2D1.Exceptions;
#if !NET6_0_OR_GREATER
using ComputeSharp.D2D1.NetStandard.System.Text;
#endif
using ComputeSharp.D2D1.Shaders.Translation;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
+2 -4
ファイルの表示
@@ -3,10 +3,8 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.D2D1.Interop.Effects;
+2 -4
ファイルの表示
@@ -6,10 +6,8 @@ using ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers;
using ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.D2D1.Interop.Effects;
@@ -4,10 +4,8 @@ using System.Runtime.InteropServices;
using System.Threading;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers;
@@ -4,10 +4,8 @@ using System.Runtime.InteropServices;
using System.Threading;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
@@ -5,10 +5,8 @@ using System.Runtime.InteropServices;
using System.Threading;
using ComputeSharp.D2D1.Interop.Effects;
using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
+2 -4
ファイルの表示
@@ -2,10 +2,8 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.D2D1.Shaders.Translation;
-3
ファイルの表示
@@ -7,9 +7,6 @@ using System.Text;
using System.Text.RegularExpressions;
using ComputeSharp.D2D1.Exceptions;
using ComputeSharp.D2D1.Extensions;
#if !NET6_0_OR_GREATER
using ComputeSharp.D2D1.NetStandard.System.Text;
#endif
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
+4 -1
ファイルの表示
@@ -9,6 +9,7 @@
<Import_RootNamespace>ComputeSharp.NetStandard</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\BitOperations.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections.Generic\DictionaryExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Collections.Generic\QueueExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Enum.cs" />
@@ -16,9 +17,11 @@
<Compile Include="$(MSBuildThisFileDirectory)System\IntPtrExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\FormatExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\StreamExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Path.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Math.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IO\Path.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\MemoryMarshal.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\RuntimeHelpers.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\NativeMemory.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Text\EncodingExtensions.cs" />
</ItemGroup>
</Project>
@@ -1,6 +1,6 @@
using System.Runtime.CompilerServices;
namespace ComputeSharp.D2D1.NetStandard.System.Buffers;
namespace ComputeSharp.NetStandard;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="BitOperations"/> on .NET 6.
+1 -1
ファイルの表示
@@ -1,4 +1,4 @@
namespace ComputeSharp.NetStandard.System;
namespace ComputeSharp.NetStandard;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="global::System.Enum"/> on .NET 6.
+1 -1
ファイルの表示
@@ -1,4 +1,4 @@
namespace ComputeSharp.NetStandard.System;
namespace ComputeSharp.NetStandard;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="global::System.GC"/> on .NET 6.
@@ -1,6 +1,6 @@
using System;
namespace ComputeSharp.NetStandard.System.IO;
namespace ComputeSharp.NetStandard;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="global::System.IO.Path"/> on .NET 6.
@@ -1,6 +1,6 @@
using System.Runtime.CompilerServices;
namespace ComputeSharp.D2D1.NetStandard.System;
namespace ComputeSharp.NetStandard;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="global::System.Math"/> on .NET 6.
+1 -1
ファイルの表示
@@ -1,7 +1,7 @@
using System;
using System.Runtime.InteropServices;
namespace ComputeSharp.NetStandard.System.Runtime.CompilerServices;
namespace ComputeSharp.NetStandard;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="RuntimeHelpers"/> on .NET 5.
+1 -1
ファイルの表示
@@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
namespace ComputeSharp.NetStandard.System.Runtime.InteropServices;
namespace ComputeSharp.NetStandard;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="MemoryMarshal"/> on .NET 6.
@@ -1,8 +1,6 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace ComputeSharp.D2D1.NetStandard.System.Text;
namespace System.Text;
/// <summary>
/// A polyfill type that mirrors some methods from <see cref="Encoding"/> on .NET 5.
+2 -4
ファイルの表示
@@ -103,12 +103,10 @@
<Import Project="..\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems" Label="Shared" />
<Import Project="..\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems" Label="Shared" />
<!-- Shared projects with .NET Standard 2.0 polyfills -->
<Import Project="..\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems" Label="Shared" />
<Import Project="..\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
<!-- Shared project with TerraFX.Interop.Windows fork -->
<Import Project="..\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems" Label="Shared" />
<Import Project="..\TerraFX.Interop.Windows.Dynamic\TerraFX.Interop.Windows.Dynamic.projitems" Label="Shared" />
<!-- Shared projects with .NET Standard 2.0 polyfills -->
<Import Project="..\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
</Project>
-3
ファイルの表示
@@ -39,9 +39,6 @@
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Condition="'$(TargetFramework)' == 'netstandard2.0'" Project="..\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
<!-- Shared project with TerraFX.Interop.Windows fork -->
<Import Condition="'$(TargetFramework)' == 'netstandard2.0'" Project="..\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems" Label="Shared" />
</Project>
+1 -1
ファイルの表示
@@ -5,7 +5,7 @@ using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using static TerraFX.Interop.DirectX.D3D12_DESCRIPTOR_HEAP_TYPE;
#if !NET6_0_OR_GREATER
using GC = ComputeSharp.NetStandard.System.GC;
using GC = ComputeSharp.NetStandard.GC;
#endif
namespace ComputeSharp.Graphics.Commands.Interop;
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
using CommunityToolkit.Diagnostics;
using ComputeSharp.Resources;
#if !NET6_0_OR_GREATER
using GC = ComputeSharp.NetStandard.System.GC;
using GC = ComputeSharp.NetStandard.GC;
#endif
namespace ComputeSharp;
+2 -4
ファイルの表示
@@ -15,10 +15,8 @@ using static TerraFX.Interop.Windows.STATFLAG;
using static TerraFX.Interop.Windows.STG;
using static TerraFX.Interop.Windows.STGM;
using static TerraFX.Interop.Windows.STGTY;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.Graphics.Extensions;
+2 -4
ファイルの表示
@@ -15,10 +15,8 @@ using static TerraFX.Interop.Windows.STATFLAG;
using static TerraFX.Interop.Windows.STG;
using static TerraFX.Interop.Windows.STGM;
using static TerraFX.Interop.Windows.STGTY;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace ComputeSharp.Graphics.Extensions;
+1 -1
ファイルの表示
@@ -11,7 +11,7 @@ using static TerraFX.Interop.DirectX.D3D12_MESSAGE_SEVERITY;
#if NET6_0_OR_GREATER
using Enum = System.Enum;
#else
using Enum = ComputeSharp.NetStandard.System.Enum;
using Enum = ComputeSharp.NetStandard.Enum;
#endif
namespace ComputeSharp.Graphics.Helpers;
+1 -1
ファイルの表示
@@ -6,7 +6,7 @@ using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
#pragma warning disable CA1416
+1 -1
ファイルの表示
@@ -5,7 +5,7 @@ using TerraFX.Interop.Windows;
#if NET6_0_OR_GREATER
using Path = System.IO.Path;
#else
using Path = ComputeSharp.NetStandard.System.IO.Path;
using Path = ComputeSharp.NetStandard.Path;
#endif
#pragma warning disable IDE0011
+1 -1
ファイルの表示
@@ -16,7 +16,7 @@ using ResourceType = ComputeSharp.Graphics.Resources.Enums.ResourceType;
#if NET6_0_OR_GREATER
using MemoryMarshal = System.Runtime.InteropServices.MemoryMarshal;
#else
using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
using MemoryMarshal = ComputeSharp.NetStandard.MemoryMarshal;
#endif
namespace ComputeSharp.Resources;
+1 -1
ファイルの表示
@@ -2,7 +2,7 @@ using System.Diagnostics;
#if NET6_0_OR_GREATER
using GC = System.GC;
#else
using GC = ComputeSharp.NetStandard.System.GC;
using GC = ComputeSharp.NetStandard.GC;
#endif
namespace ComputeSharp.Resources.Debug;
+1 -1
ファイルの表示
@@ -2,7 +2,7 @@ using System.Diagnostics;
#if NET6_0_OR_GREATER
using GC = System.GC;
#else
using GC = ComputeSharp.NetStandard.System.GC;
using GC = ComputeSharp.NetStandard.GC;
#endif
namespace ComputeSharp.Resources.Debug;
+2 -4
ファイルの表示
@@ -6,10 +6,8 @@
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
#if NET6_0_OR_GREATER
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
#else
using RuntimeHelpers = ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#endif
namespace TerraFX.Interop.Windows;
+1 -1
ファイルの表示
@@ -6,7 +6,7 @@
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using RuntimeHelpers = ComputeSharp.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers;
#pragma warning disable IDE1006