diff --git a/ComputeSharp.sln b/ComputeSharp.sln index 651f9a1a..0313b614 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -48,7 +48,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Tests.NativeLi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.SwapChain", "samples\ComputeSharp.SwapChain\ComputeSharp.SwapChain.csproj", "{E7C9247D-016B-4819-AF9F-0E9B3591E04B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.SwapChain.Cli", "samples\ComputeSharp.SwapChain.Cli\ComputeSharp.SwapChain.Cli.csproj", "{C12D7ACE-98ED-4813-8118-6667C34F484F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.SwapChain.Cli", "samples\ComputeSharp.SwapChain.Cli\ComputeSharp.SwapChain.Cli.csproj", "{C12D7ACE-98ED-4813-8118-6667C34F484F}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ComputeSharp.Sample.FSharp", "samples\ComputeSharp.Sample.FSharp\ComputeSharp.Sample.FSharp.fsproj", "{7C625EC4-F599-4350-A915-F046DF2406D3}" EndProject @@ -84,12 +84,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1", "src\Co EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TerraFX.Interop.Windows.D2D1", "src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.shproj", "{9DA1DA9F-F8B2-4B25-BE80-C21F773029E3}" EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.D2D1.NetStandard", "src\ComputeSharp.D2D1.NetStandard\ComputeSharp.D2D1.NetStandard.shproj", "{2608EB41-F98B-4BE5-9F4D-68FED6115088}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Core", "src\ComputeSharp.Core\ComputeSharp.Core.csproj", "{764BC0F5-0C5E-49AD-ABAA-E3874C0F3286}" EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.Core.NetStandard", "src\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.shproj", "{3ACACF03-6B20-40BA-B8EC-11AC1624D2C9}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Core.SourceGenerators", "src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj", "{BFB003D1-788B-48DE-8065-39479C162CB0}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.SourceGenerators", "src\ComputeSharp.D2D1.SourceGenerators\ComputeSharp.D2D1.SourceGenerators.csproj", "{E44053BD-A761-47FB-AA78-087A599672EA}" @@ -132,7 +128,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B86A48A7-18B src\Directory.Build.targets = src\Directory.Build.targets EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.D2D1.Uwp", "src\ComputeSharp.D2D1.Uwp\ComputeSharp.D2D1.Uwp.csproj", "{E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.Uwp", "src\ComputeSharp.D2D1.Uwp\ComputeSharp.D2D1.Uwp.csproj", "{E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -222,6 +218,14 @@ Global {E7C9247D-016B-4819-AF9F-0E9B3591E04B}.Release|ARM64.Build.0 = Release|ARM64 {E7C9247D-016B-4819-AF9F-0E9B3591E04B}.Release|x64.ActiveCfg = Release|x64 {E7C9247D-016B-4819-AF9F-0E9B3591E04B}.Release|x64.Build.0 = Release|x64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|ARM64.Build.0 = Debug|ARM64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|x64.ActiveCfg = Debug|x64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|x64.Build.0 = Debug|x64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|ARM64.ActiveCfg = Release|ARM64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|ARM64.Build.0 = Release|ARM64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|x64.ActiveCfg = Release|x64 + {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|x64.Build.0 = Release|x64 {7C625EC4-F599-4350-A915-F046DF2406D3}.Debug|ARM64.ActiveCfg = Debug|Any CPU {7C625EC4-F599-4350-A915-F046DF2406D3}.Debug|ARM64.Build.0 = Debug|Any CPU {7C625EC4-F599-4350-A915-F046DF2406D3}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -366,14 +370,6 @@ Global {669A414F-3B46-4B55-B587-061AF63C3067}.Release|ARM64.Build.0 = Release|Any CPU {669A414F-3B46-4B55-B587-061AF63C3067}.Release|x64.ActiveCfg = Release|Any CPU {669A414F-3B46-4B55-B587-061AF63C3067}.Release|x64.Build.0 = Release|Any CPU - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|ARM64.Build.0 = Debug|ARM64 - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|x64.ActiveCfg = Debug|x64 - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Debug|x64.Build.0 = Debug|x64 - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|ARM64.ActiveCfg = Release|ARM64 - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|ARM64.Build.0 = Release|ARM64 - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|x64.ActiveCfg = Release|x64 - {C12D7ACE-98ED-4813-8118-6667C34F484F}.Release|x64.Build.0 = Release|x64 {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Debug|ARM64.ActiveCfg = Debug|ARM64 {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Debug|ARM64.Build.0 = Debug|ARM64 {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Debug|x64.ActiveCfg = Debug|x64 @@ -395,6 +391,7 @@ Global {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {BF52326F-E415-49E6-8595-62762216762B} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {E7C9247D-016B-4819-AF9F-0E9B3591E04B} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} + {C12D7ACE-98ED-4813-8118-6667C34F484F} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} {7C625EC4-F599-4350-A915-F046DF2406D3} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} {1F37A704-3CDF-45BB-8114-ED9137E5F2CF} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} {A5997814-D8D2-4541-87AC-C3E53CAA67C0} = {8DCE343F-BA78-4FE1-B562-B57C603A8BAA} @@ -406,8 +403,6 @@ Global {4A8FCE22-851C-442A-8BC9-3EC3FD00B637} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {158F984D-CD96-4062-BD02-2268946031A0} = {8DCE343F-BA78-4FE1-B562-B57C603A8BAA} {9DA1DA9F-F8B2-4B25-BE80-C21F773029E3} = {8DCE343F-BA78-4FE1-B562-B57C603A8BAA} - {2608EB41-F98B-4BE5-9F4D-68FED6115088} = {8DCE343F-BA78-4FE1-B562-B57C603A8BAA} - {3ACACF03-6B20-40BA-B8EC-11AC1624D2C9} = {8DCE343F-BA78-4FE1-B562-B57C603A8BAA} {209C95A3-FA53-431B-B688-3299CA6C29D2} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {94178D51-0097-4AD2-B3D0-827E40D62F2E} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {CBA545B4-31EF-4E9F-A1A8-2A1290B54046} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} @@ -416,7 +411,6 @@ Global {5DE90C85-ED26-4B5A-A0D7-2FF966A210AC} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {669A414F-3B46-4B55-B587-061AF63C3067} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {B86A48A7-18BD-4946-B995-3CE26B092DDF} = {1A9C4108-F61A-4ABE-B5CF-F524521EAE2D} - {C12D7ACE-98ED-4813-8118-6667C34F484F} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC} @@ -427,32 +421,26 @@ Global samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{0800bd51-499d-44c2-9417-fd1f7fdfe9c4}*SharedItemsImports = 13 src\ComputeSharp.UI\ComputeSharp.UI.projitems*{0c82ede1-5b8a-4df3-87da-700b29d5e265}*SharedItemsImports = 13 src\TerraFX.Interop.Windows.Dynamic\TerraFX.Interop.Windows.Dynamic.projitems*{158f984d-cd96-4062-bd02-2268946031a0}*SharedItemsImports = 13 - src\ComputeSharp.D2D1.NetStandard\ComputeSharp.D2D1.NetStandard.projitems*{2608eb41-f98b-4be5-9f4d-68fed6115088}*SharedItemsImports = 13 - src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{314eb353-e7e3-4146-8111-685cc83ec1de}*SharedItemsImports = 5 src\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems*{314eb353-e7e3-4146-8111-685cc83ec1de}*SharedItemsImports = 5 - src\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems*{3acacf03-6b20-40ba-b8ec-11ac1624d2c9}*SharedItemsImports = 13 - src\ComputeSharp.D2D1.NetStandard\ComputeSharp.D2D1.NetStandard.projitems*{4d7d9ba8-a821-4b1c-9ee2-cbcf5849906e}*SharedItemsImports = 5 src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems*{4d7d9ba8-a821-4b1c-9ee2-cbcf5849906e}*SharedItemsImports = 5 src\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems*{514ff00e-bbf0-4d55-a47c-eeeb6208adce}*SharedItemsImports = 13 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{51d5a422-d3a5-4c4d-8a6d-a048940bf279}*SharedItemsImports = 13 samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.projitems*{751bb05b-563d-4b3a-94c6-15e2d79d35ea}*SharedItemsImports = 13 - src\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems*{764bc0f5-0c5e-49ad-abaa-e3874c0f3286}*SharedItemsImports = 5 + src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{764bc0f5-0c5e-49ad-abaa-e3874c0f3286}*SharedItemsImports = 5 src\TerraFX.Interop.Windows.Dynamic\TerraFX.Interop.Windows.Dynamic.projitems*{76c66257-fdaa-47ab-85e7-ef757eab10c0}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems*{9ac496a3-bbf0-4c8f-a50d-a20bf01c5e05}*SharedItemsImports = 13 src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems*{9da1da9f-f8b2-4b25-be80-c21f773029e3}*SharedItemsImports = 13 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{a5997814-d8d2-4541-87ac-c3e53caa67c0}*SharedItemsImports = 13 src\ComputeSharp.UI\ComputeSharp.UI.projitems*{afaafdc9-be42-45d4-8c79-0ee8c8edbf52}*SharedItemsImports = 5 - src\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems*{bfb003d1-788b-48de-8065-39479c162cb0}*SharedItemsImports = 5 + src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{bfb003d1-788b-48de-8065-39479c162cb0}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{bfb003d1-788b-48de-8065-39479c162cb0}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{c12d7ace-98ed-4813-8118-6667c34f484f}*SharedItemsImports = 5 - src\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 - src\ComputeSharp.D2D1.NetStandard\ComputeSharp.D2D1.NetStandard.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 + src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e7c9247d-016b-4819-af9f-0e9b3591e04b}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e91f4d24-922a-4921-a8d7-9c45a143c45d}*SharedItemsImports = 5 - src\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj index 228dd36e..1877ab6d 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -80,7 +80,6 @@ - MainView.xaml @@ -160,7 +159,7 @@ - 8.0.0 + 8.1.0-preview3 5.0.1 @@ -183,6 +182,11 @@ 2.8.2 + + 1.10.0 + build; analyzers + all + diff --git a/samples/ComputeSharp.SwapChain.Uwp/Properties/SkipLocalsInitAttribute.cs b/samples/ComputeSharp.SwapChain.Uwp/Properties/SkipLocalsInitAttribute.cs deleted file mode 100644 index 56e0896b..00000000 --- a/samples/ComputeSharp.SwapChain.Uwp/Properties/SkipLocalsInitAttribute.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace System.Runtime.CompilerServices; - -/// -/// Used to indicate to the compiler that the .locals init flag should not be set in method headers. -/// -[AttributeUsage(AttributeTargets.Module - | AttributeTargets.Class - | AttributeTargets.Struct - | AttributeTargets.Interface - | AttributeTargets.Constructor - | AttributeTargets.Method - | AttributeTargets.Property - | AttributeTargets.Event, Inherited = false)] -internal sealed class SkipLocalsInitAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.projitems b/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.projitems deleted file mode 100644 index 62c4d520..00000000 --- a/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.projitems +++ /dev/null @@ -1,18 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - 3acacf03-6b20-40ba-b8ec-11ac1624d2c9 - - - ComputeSharp.Core.NetStandard - - - - - - - - - \ No newline at end of file diff --git a/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.shproj b/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.shproj deleted file mode 100644 index 9964b218..00000000 --- a/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.shproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - 3acacf03-6b20-40ba-b8ec-11ac1624d2c9 - 14.0 - - - - - - - - diff --git a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/InterpolatedStringHandlerArgumentAttribute.cs b/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/InterpolatedStringHandlerArgumentAttribute.cs deleted file mode 100644 index 38c625ca..00000000 --- a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/InterpolatedStringHandlerArgumentAttribute.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace System.Runtime.CompilerServices; - -/// -/// Indicates which arguments to a method involving an interpolated string handler should be passed to that handler. -/// -[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] -internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute -{ - /// - /// Initializes a new instance of the class. - /// - /// The name of the argument that should be passed to the handler. - /// may be used as the name of the receiver in an instance method. - public InterpolatedStringHandlerArgumentAttribute(string argument) - { - Arguments = new string[] { argument }; - } - - /// - /// Initializes a new instance of the class. - /// - /// The names of the arguments that should be passed to the handler. - /// may be used as the name of the receiver in an instance method. - public InterpolatedStringHandlerArgumentAttribute(params string[] arguments) - { - Arguments = arguments; - } - - /// - /// Gets the names of the arguments that should be passed to the handler. - /// - /// may be used as the name of the receiver in an instance method. - public string[] Arguments { get; } -} \ No newline at end of file diff --git a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/InterpolatedStringHandlerAttribute.cs b/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/InterpolatedStringHandlerAttribute.cs deleted file mode 100644 index b618403c..00000000 --- a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/InterpolatedStringHandlerAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace System.Runtime.CompilerServices; - -/// -/// Indicates the attributed type is to be used as an interpolated string handler. -/// -[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] -internal sealed class InterpolatedStringHandlerAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/IsExternalInit.cs b/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/IsExternalInit.cs deleted file mode 100644 index c02e30d6..00000000 --- a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/IsExternalInit.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.ComponentModel; - -namespace System.Runtime.CompilerServices; - -/// -/// Reserved to be used by the compiler for tracking metadata. -/// This class should not be used by developers in source code. -/// -[EditorBrowsable(EditorBrowsableState.Never)] -internal static class IsExternalInit -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/RuntimeHelpers.cs b/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/RuntimeHelpers.cs deleted file mode 100644 index 2676343b..00000000 --- a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/RuntimeHelpers.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices; - -/// -/// A polyfill type that mirrors some methods from on .NET 5. -/// -internal static class RuntimeHelpers -{ - /// - /// Allocates some memory tied to the lifetime of a specific type. - /// - /// The type to associate the memory to. - /// The size in byte of the memory to allocate. - /// A pointer to the allocated memory. - public static IntPtr AllocateTypeAssociatedMemory(Type type, int size) - { - return Marshal.AllocHGlobal(size); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/SkipLocalsInitAttribute.cs b/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/SkipLocalsInitAttribute.cs deleted file mode 100644 index 6d63a804..00000000 --- a/src/ComputeSharp.Core.NetStandard/System/Runtime.CompilerServices/SkipLocalsInitAttribute.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace System.Runtime.CompilerServices; - -/// -/// Used to indicate to the compiler that the .locals init -/// flag should not be set in method headers. -/// -/// -/// This attribute is unsafe because it may reveal uninitialized memory to -/// the application in certain instances (e.g., reading from uninitialized -/// stackalloc'd memory). If applied to a method directly, the attribute -/// applies to that method and all nested functions (lambdas, local -/// functions) below it. If applied to a type or module, it applies to all -/// methods nested inside. This attribute is intentionally not permitted on -/// assemblies. Use at the module level instead to apply to multiple type -/// declarations. -/// -[AttributeUsage(AttributeTargets.Module - | AttributeTargets.Class - | AttributeTargets.Struct - | AttributeTargets.Interface - | AttributeTargets.Constructor - | AttributeTargets.Method - | AttributeTargets.Property - | AttributeTargets.Event, Inherited = false)] -internal sealed class SkipLocalsInitAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.Core.SourceGenerators/ComputeSharp.Core.SourceGenerators.csproj b/src/ComputeSharp.Core.SourceGenerators/ComputeSharp.Core.SourceGenerators.csproj index f7347d86..5f06401d 100644 --- a/src/ComputeSharp.Core.SourceGenerators/ComputeSharp.Core.SourceGenerators.csproj +++ b/src/ComputeSharp.Core.SourceGenerators/ComputeSharp.Core.SourceGenerators.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -15,7 +15,6 @@ manually linking the source files from ComputeSharp\Core in here. We only need them to extract metadata and to match members based on full name, so the types being in the generator assembly are not an issue.--> - @@ -81,6 +80,5 @@ - - + diff --git a/src/ComputeSharp.Core/ComputeSharp.Core.csproj b/src/ComputeSharp.Core/ComputeSharp.Core.csproj index 34bcb729..283c982c 100644 --- a/src/ComputeSharp.Core/ComputeSharp.Core.csproj +++ b/src/ComputeSharp.Core/ComputeSharp.Core.csproj @@ -27,5 +27,5 @@ - + diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs index c3e5d87e..b2393b2e 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs index 01fea3c5..f118c8e0 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs index 3a838e9c..51b833a2 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Bool/BoolMxN.g.cs b/src/ComputeSharp.Core/Primitives/Bool/BoolMxN.g.cs index aa33c216..b173a147 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/BoolMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/BoolMxN.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs index 131c1b32..7712ce9e 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs index d21af61e..3fb62e96 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs index 9f5f2f49..138da11f 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Double/DoubleMxN.g.cs b/src/ComputeSharp.Core/Primitives/Double/DoubleMxN.g.cs index 093bbaca..f946b9c5 100644 --- a/src/ComputeSharp.Core/Primitives/Double/DoubleMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/Double/DoubleMxN.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs index 0e5be499..51a3919d 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs index e86e54ab..76368312 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs index 847e24ee..aa1205fd 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs b/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs index e458c37e..33554337 100644 --- a/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs index c8e1ea58..b8fc1714 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs index 3385e8f7..d158b264 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs index 24ddf313..faaf3357 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs index 86627011..a092d2b5 100644 --- a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude index d1129567..ab58fef3 100644 --- a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude +++ b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs index 29125e97..fa64a737 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs index ff57fbb8..26353ec6 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs index 31e4c0c5..15977e8a 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs index 365620dd..14df1cf2 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs @@ -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 diff --git a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude index 54fe23af..186df432 100644 --- a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude +++ b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude @@ -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 diff --git a/src/ComputeSharp.Core/Properties/Polyfills/UnscopedRefAttribute.cs b/src/ComputeSharp.Core/Properties/Polyfills/UnscopedRefAttribute.cs deleted file mode 100644 index f6f5776c..00000000 --- a/src/ComputeSharp.Core/Properties/Polyfills/UnscopedRefAttribute.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Used to indicate a byref escapes and is not scoped. -/// -/// -/// -/// There are several cases where the C# compiler treats a as implicitly -/// - where the compiler does not allow the to escape the method. -/// -/// -/// For example: -/// -/// for instance methods. -/// parameters that refer to types. -/// parameters. -/// -/// -/// -/// This attribute is used in those instances where the should be allowed to escape. -/// -/// -/// Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for -/// API authors to understand the lifetime implications of applying this attribute and how it may impact their users. -/// -/// -[AttributeUsage( - AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, - AllowMultiple = false, - Inherited = false)] -internal sealed class UnscopedRefAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.projitems b/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.projitems deleted file mode 100644 index 4e744618..00000000 --- a/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.projitems +++ /dev/null @@ -1,25 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - 2608eb41-f98b-4be5-9f4d-68fed6115088 - - - ComputeSharp.D2D1.NetStandard - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.shproj b/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.shproj deleted file mode 100644 index 78c7c427..00000000 --- a/src/ComputeSharp.D2D1.NetStandard/ComputeSharp.D2D1.NetStandard.shproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - 2608eb41-f98b-4be5-9f4d-68fed6115088 - 14.0 - - - - - - - - diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/DisallowNullAttribute.cs b/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/DisallowNullAttribute.cs deleted file mode 100644 index a584aa30..00000000 --- a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/DisallowNullAttribute.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Specifies that null is disallowed as an input even if the corresponding type allows it. -/// -[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)] -internal sealed class DisallowNullAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/DoesNotReturnAttribute.cs b/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/DoesNotReturnAttribute.cs deleted file mode 100644 index 1c661961..00000000 --- a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/DoesNotReturnAttribute.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Applied to a method that will never return under any circumstance. -/// -/// Internal copy from the BCL attribute. -[AttributeUsage(AttributeTargets.Method, Inherited = false)] -internal sealed class DoesNotReturnAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullAttribute.cs b/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullAttribute.cs deleted file mode 100644 index ca082723..00000000 --- a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Specifies that an output will not be null even if the corresponding type allows it. -/// Specifies that an input argument was not null when the call returns. -/// -/// Internal copy from the BCL attribute. -[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)] -internal sealed class NotNullAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullIfNotNullAttribute.cs b/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullIfNotNullAttribute.cs deleted file mode 100644 index 4629b739..00000000 --- a/src/ComputeSharp.D2D1.NetStandard/System/Diagnostics.CodeAnalysis/NotNullIfNotNullAttribute.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Specifies that the output will be non-null if the named parameter is non-null. -/// -[AttributeUsage( - AttributeTargets.Parameter | - AttributeTargets.Property | - AttributeTargets.ReturnValue, - AllowMultiple = true, Inherited = false)] -internal sealed class NotNullIfNotNullAttribute : Attribute -{ - /// - /// Initializes the attribute with the associated parameter name. - /// - /// The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. - public NotNullIfNotNullAttribute(string parameterName) - { - ParameterName = parameterName; - } - - /// - /// Gets the associated parameter name. - /// - public string ParameterName { get; } -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Runtime/CompilerServices/RuntimeHelpers.cs b/src/ComputeSharp.D2D1.NetStandard/System/Runtime/CompilerServices/RuntimeHelpers.cs deleted file mode 100644 index 38812bf3..00000000 --- a/src/ComputeSharp.D2D1.NetStandard/System/Runtime/CompilerServices/RuntimeHelpers.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace ComputeSharp.D2D1.NetStandard.System.Runtime.CompilerServices; - -/// -/// A polyfill type that mirrors some methods from on .NET 5. -/// -internal static class RuntimeHelpers -{ - /// - /// Allocates some memory tied to the lifetime of a specific type. - /// - /// The type to associate the memory to. - /// The size in byte of the memory to allocate. - /// A pointer to the allocated memory. - public static IntPtr AllocateTypeAssociatedMemory(Type type, int size) - { - return Marshal.AllocHGlobal(size); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj b/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj index 30518540..e04c8b81 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj +++ b/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj @@ -15,7 +15,6 @@ - @@ -65,7 +64,6 @@ - @@ -107,10 +105,9 @@ - - - - + + + diff --git a/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj b/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj index 7a528d56..1a8cfbda 100644 --- a/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj +++ b/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj @@ -27,7 +27,4 @@ - - - diff --git a/src/ComputeSharp.D2D1/Extensions/RECTExtensions.cs b/src/ComputeSharp.D2D1/Extensions/RECTExtensions.cs index ce9bdacc..890e181d 100644 --- a/src/ComputeSharp.D2D1/Extensions/RECTExtensions.cs +++ b/src/ComputeSharp.D2D1/Extensions/RECTExtensions.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Properties/Polyfills/CompilerFeatureRequiredAttribute.cs b/src/ComputeSharp.D2D1/Properties/Polyfills/CompilerFeatureRequiredAttribute.cs deleted file mode 100644 index 3da8c78b..00000000 --- a/src/ComputeSharp.D2D1/Properties/Polyfills/CompilerFeatureRequiredAttribute.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Runtime.CompilerServices; - -/// -/// Indicates that compiler support for a particular feature is required for the location where this attribute is applied. -/// -[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] -internal sealed class CompilerFeatureRequiredAttribute : Attribute -{ - /// - /// Initializes the with the identifier of the syntax used. - /// - /// The name of the compiler feature. - public CompilerFeatureRequiredAttribute(string featureName) - { - FeatureName = featureName; - } - - /// - /// The name of the compiler feature. - /// - public string FeatureName { get; } - - /// - /// If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand . - /// - public bool IsOptional { get; init; } - - /// - /// The used for the ref structs C# feature. - /// - public const string RefStructs = nameof(RefStructs); - - /// - /// The used for the required members C# feature. - /// - public const string RequiredMembers = nameof(RequiredMembers); -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1/Properties/Polyfills/RequiredMemberAttribute.cs b/src/ComputeSharp.D2D1/Properties/Polyfills/RequiredMemberAttribute.cs deleted file mode 100644 index 8b14f9a2..00000000 --- a/src/ComputeSharp.D2D1/Properties/Polyfills/RequiredMemberAttribute.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Runtime.CompilerServices; - -/// -/// Specifies that a type has required members or that a member is required. -/// -[AttributeUsage( - AttributeTargets.Class | - AttributeTargets.Struct | - AttributeTargets.Field | - AttributeTargets.Property, - AllowMultiple = false, - Inherited = false)] -internal sealed class RequiredMemberAttribute : Attribute -{ -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1/Properties/Polyfills/StringSyntaxAttribute.cs b/src/ComputeSharp.D2D1/Properties/Polyfills/StringSyntaxAttribute.cs deleted file mode 100644 index bb9a2248..00000000 --- a/src/ComputeSharp.D2D1/Properties/Polyfills/StringSyntaxAttribute.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Specifies the syntax used in a string. -/// -[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -internal sealed class StringSyntaxAttribute : Attribute -{ - /// - /// Initializes the with the identifier of the syntax used. - /// - /// The syntax identifier. - public StringSyntaxAttribute(string syntax) - { - Syntax = syntax; - Arguments = Array.Empty(); - } - - /// - /// Initializes the with the identifier of the syntax used. - /// - /// The syntax identifier. - /// Optional arguments associated with the specific syntax employed. - public StringSyntaxAttribute(string syntax, params object?[] arguments) - { - Syntax = syntax; - Arguments = arguments; - } - - /// - /// Gets the identifier of the syntax used. - /// - public string Syntax { get; } - - /// - /// Optional arguments associated with the specific syntax employed. - /// - public object?[] Arguments { get; } -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriterExtensions.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriterExtensions.cs index 0ca1d077..a4d08422 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriterExtensions.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriterExtensions.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter{T}.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter{T}.cs index c5378083..b84c8372 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter{T}.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter{T}.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1EffectRegistrationData.cs b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1EffectRegistrationData.cs index 4bc80f68..5f7e6715 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1EffectRegistrationData.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1EffectRegistrationData.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1ShaderCompiler.cs b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1ShaderCompiler.cs index bf1df774..9e635129 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1ShaderCompiler.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1ShaderCompiler.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.For{T}.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.For{T}.cs index 237cb296..3e277c45 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.For{T}.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.For{T}.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs index a5d848eb..21ebdd53 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs @@ -4,9 +4,6 @@ using ComputeSharp.D2D1.Extensions; using ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Interop.Effects; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs index 3dae4865..1affe1a6 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs @@ -4,9 +4,6 @@ using ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers; using ComputeSharp.D2D1.Shaders.Interop.Extensions; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Interop.Effects; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.cs index e18736a2..34278eb8 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.cs @@ -5,9 +5,6 @@ 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 UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Interop.Effects; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.g.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.g.cs index c063bc05..394d4a6d 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.g.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.g.cs @@ -1,12 +1,9 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; #if !NET6_OR_GREATER using System.Runtime.InteropServices; #endif using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Interop.Effects; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.tt b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.tt index ab23251a..97f33957 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.tt +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.Properties.tt @@ -1,4 +1,4 @@ -<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ template debug="false" hostspecific="false" language="C#" #> <#@ assembly name="System.Core" #> <#@ output extension=".g.cs"#> using System.Runtime.CompilerServices; @@ -7,9 +7,6 @@ using System.Runtime.InteropServices; #endif using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Interop.Effects; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.cs index d38561c2..a898f11b 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManager.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManager.cs index 58c2875b..624b129b 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManager.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManager.cs @@ -2,9 +2,6 @@ using System; using System.Runtime.InteropServices; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManagerInternal.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManagerInternal.cs index c8e9ba9f..1b8a84ed 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManagerInternal.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.ID2D1ResourceTextureManagerInternal.cs @@ -3,9 +3,6 @@ using System.Runtime.InteropServices; using ComputeSharp.D2D1.Shaders.Interop.Extensions; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.cs index 100bc5b1..575fdcc6 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/ResourceManagers/D2D1ResourceTextureManagerImpl.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContex.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContex.cs index b39239ca..43153ae7 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContex.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContex.cs @@ -1,9 +1,6 @@ using System; using System.Runtime.InteropServices; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContexInternal.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContexInternal.cs index 8b283f73..f252aeda 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContexInternal.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.ID2D1DrawInfoUpdateContexInternal.cs @@ -1,9 +1,6 @@ using System; using System.Runtime.InteropServices; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.cs index b49bdfbc..c49d0fdf 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1DrawInfoUpdateContextImpl.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapper.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapper.cs index 930b7409..6d302318 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapper.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapper.cs @@ -5,9 +5,6 @@ using System.Runtime.InteropServices; using ComputeSharp.D2D1.Extensions; using ComputeSharp.D2D1.Interop.Effects; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapperInternal.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapperInternal.cs index a8b27553..502eaf89 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapperInternal.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.ID2D1TransformMapperInternal.cs @@ -1,9 +1,6 @@ using System; using System.Runtime.InteropServices; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers; diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.cs index c8cce206..6a7141ab 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/TransformMappers/D2D1TransformMapperImpl.cs @@ -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; diff --git a/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.ID3DInclude.cs b/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.ID3DInclude.cs index 8269fe02..c4c48c11 100644 --- a/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.ID3DInclude.cs +++ b/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.ID3DInclude.cs @@ -2,11 +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; -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; +#if !NET6_0_OR_GREATER +using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers; #endif namespace ComputeSharp.D2D1.Shaders.Translation; diff --git a/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.cs b/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.cs index be6c0b08..36a1f3b5 100644 --- a/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.cs +++ b/src/ComputeSharp.D2D1/Shaders/Translation/D3DCompiler.cs @@ -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; diff --git a/src/ComputeSharp.NetStandard/ComputeSharp.NetStandard.projitems b/src/ComputeSharp.NetStandard/ComputeSharp.NetStandard.projitems index 553bab65..830cad6b 100644 --- a/src/ComputeSharp.NetStandard/ComputeSharp.NetStandard.projitems +++ b/src/ComputeSharp.NetStandard/ComputeSharp.NetStandard.projitems @@ -9,21 +9,19 @@ ComputeSharp.NetStandard + - - - + + - - - + \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Buffers/BitOperations.cs b/src/ComputeSharp.NetStandard/System/Buffers/BitOperations.cs similarity index 94% rename from src/ComputeSharp.D2D1.NetStandard/System/Buffers/BitOperations.cs rename to src/ComputeSharp.NetStandard/System/Buffers/BitOperations.cs index fa177274..77d206d5 100644 --- a/src/ComputeSharp.D2D1.NetStandard/System/Buffers/BitOperations.cs +++ b/src/ComputeSharp.NetStandard/System/Buffers/BitOperations.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -namespace ComputeSharp.D2D1.NetStandard.System.Buffers; +namespace ComputeSharp.NetStandard; /// /// A polyfill type that mirrors some methods from on .NET 6. diff --git a/src/ComputeSharp.NetStandard/System/Diagnostics.CodeAnalysis/MemberNotNullAttribute.cs b/src/ComputeSharp.NetStandard/System/Diagnostics.CodeAnalysis/MemberNotNullAttribute.cs deleted file mode 100644 index 2d663176..00000000 --- a/src/ComputeSharp.NetStandard/System/Diagnostics.CodeAnalysis/MemberNotNullAttribute.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Specifies that the method or property will ensure that the listed field and property members have not-null values. -/// -[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] -internal sealed class MemberNotNullAttribute : Attribute -{ - /// - /// Initializes the attribute with a field or property member. - /// - /// The field or property member that is promised to be not-null. - public MemberNotNullAttribute(string member) - { - Members = new[] { member }; - } - - /// - /// Initializes the attribute with the list of field and property members. - /// - /// The list of field and property members that are promised to be not-null. - public MemberNotNullAttribute(params string[] members) - { - Members = members; - } - - /// - /// Gets field or property member names. - /// - public string[] Members { get; } -} \ No newline at end of file diff --git a/src/ComputeSharp.NetStandard/System/Diagnostics.CodeAnalysis/RequiresUnreferencedCodeAttribute.cs b/src/ComputeSharp.NetStandard/System/Diagnostics.CodeAnalysis/RequiresUnreferencedCodeAttribute.cs deleted file mode 100644 index 699a1844..00000000 --- a/src/ComputeSharp.NetStandard/System/Diagnostics.CodeAnalysis/RequiresUnreferencedCodeAttribute.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Indicates that the specified method requires dynamic access to code that is not referenced -/// statically, for example through . -/// -/// -/// This allows tools to understand which methods are unsafe to call when removing unreferenced -/// code from an application. -/// -[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class, Inherited = false)] -internal sealed class RequiresUnreferencedCodeAttribute : Attribute -{ - /// - /// Initializes a new instance of the class - /// with the specified message. - /// - /// - /// A message that contains information about the usage of unreferenced code. - /// - public RequiresUnreferencedCodeAttribute(string message) - { - Message = message; - } - - /// - /// Gets a message that contains information about the usage of unreferenced code. - /// - public string Message { get; } - - /// - /// Gets or sets an optional URL that contains more information about the method, - /// why it requires unreferenced code, and what options a consumer has to deal with it. - /// - public string? Url { get; set; } -} \ No newline at end of file diff --git a/src/ComputeSharp.NetStandard/System/Enum.cs b/src/ComputeSharp.NetStandard/System/Enum.cs index 4ea63575..2389db55 100644 --- a/src/ComputeSharp.NetStandard/System/Enum.cs +++ b/src/ComputeSharp.NetStandard/System/Enum.cs @@ -1,4 +1,4 @@ -namespace ComputeSharp.NetStandard.System; +namespace ComputeSharp.NetStandard; /// /// A polyfill type that mirrors some methods from on .NET 6. diff --git a/src/ComputeSharp.NetStandard/System/GC.cs b/src/ComputeSharp.NetStandard/System/GC.cs index 5ef7f82b..8bc43596 100644 --- a/src/ComputeSharp.NetStandard/System/GC.cs +++ b/src/ComputeSharp.NetStandard/System/GC.cs @@ -1,4 +1,4 @@ -namespace ComputeSharp.NetStandard.System; +namespace ComputeSharp.NetStandard; /// /// A polyfill type that mirrors some methods from on .NET 6. diff --git a/src/ComputeSharp.NetStandard/System/Path.cs b/src/ComputeSharp.NetStandard/System/IO/Path.cs similarity index 92% rename from src/ComputeSharp.NetStandard/System/Path.cs rename to src/ComputeSharp.NetStandard/System/IO/Path.cs index c07e3711..17593483 100644 --- a/src/ComputeSharp.NetStandard/System/Path.cs +++ b/src/ComputeSharp.NetStandard/System/IO/Path.cs @@ -1,6 +1,6 @@ using System; -namespace ComputeSharp.NetStandard.System.IO; +namespace ComputeSharp.NetStandard; /// /// A polyfill type that mirrors some methods from on .NET 6. diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Math.cs b/src/ComputeSharp.NetStandard/System/Math.cs similarity index 96% rename from src/ComputeSharp.D2D1.NetStandard/System/Math.cs rename to src/ComputeSharp.NetStandard/System/Math.cs index 8d011f9a..8e65f153 100644 --- a/src/ComputeSharp.D2D1.NetStandard/System/Math.cs +++ b/src/ComputeSharp.NetStandard/System/Math.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -namespace ComputeSharp.D2D1.NetStandard.System; +namespace ComputeSharp.NetStandard; /// /// A polyfill type that mirrors some methods from on .NET 6. diff --git a/src/ComputeSharp.NetStandard/System/Runtime/CompilerServices/RuntimeHelpers.cs b/src/ComputeSharp.NetStandard/System/Runtime/CompilerServices/RuntimeHelpers.cs index 82c79c14..4ba073f0 100644 --- a/src/ComputeSharp.NetStandard/System/Runtime/CompilerServices/RuntimeHelpers.cs +++ b/src/ComputeSharp.NetStandard/System/Runtime/CompilerServices/RuntimeHelpers.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.InteropServices; -namespace ComputeSharp.NetStandard.System.Runtime.CompilerServices; +namespace ComputeSharp.NetStandard; /// /// A polyfill type that mirrors some methods from on .NET 5. diff --git a/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs b/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs index c80bc981..a3ff9bcd 100644 --- a/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs +++ b/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.CompilerServices; -namespace ComputeSharp.NetStandard.System.Runtime.InteropServices; +namespace ComputeSharp.NetStandard; /// /// A polyfill type that mirrors some methods from on .NET 6. diff --git a/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs b/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs deleted file mode 100644 index 9b9e96e5..00000000 --- a/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; - -#pragma warning disable CS0649 - -namespace ComputeSharp.NetStandard.System.Runtime.InteropServices; // This cannot be in System.Runtime.InteropServices, or Roslyn will recognize it - -/// -/// Any method marked with can be directly called from native code. -/// -/// -/// This polyfill is deliberately in the wrong namespace to avoid the C# compiler failing to build below .NET 5. -/// -[AttributeUsage(AttributeTargets.Method, Inherited = false)] -internal sealed class UnmanagedCallersOnlyAttribute : Attribute -{ - /// - /// Optional. If omitted, the runtime will use the default platform calling convention. - /// - /// - /// Supplied types must be from the official "System.Runtime.CompilerServices" namespace and be of the form "CallConvXXX". - /// - public Type[]? CallConvs; - - /// - /// Optional. If omitted, no named export is emitted during compilation. - /// - public string? EntryPoint; -} \ No newline at end of file diff --git a/src/ComputeSharp.NetStandard/System/Runtime/Versioning/OSPlatformAttribute.cs b/src/ComputeSharp.NetStandard/System/Runtime/Versioning/OSPlatformAttribute.cs deleted file mode 100644 index 1c78df51..00000000 --- a/src/ComputeSharp.NetStandard/System/Runtime/Versioning/OSPlatformAttribute.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Diagnostics; - -namespace System.Runtime.Versioning; - -/// -/// Base type for all platform-specific API attributes. -/// -[Conditional("DEBUG")] -internal abstract class OSPlatformAttribute : Attribute -{ - private protected OSPlatformAttribute(string platformName) - { - PlatformName = platformName; - } - - public string PlatformName { get; } -} \ No newline at end of file diff --git a/src/ComputeSharp.NetStandard/System/Runtime/Versioning/SupportedOSPlatformAttribute.cs b/src/ComputeSharp.NetStandard/System/Runtime/Versioning/SupportedOSPlatformAttribute.cs deleted file mode 100644 index e1ea17d0..00000000 --- a/src/ComputeSharp.NetStandard/System/Runtime/Versioning/SupportedOSPlatformAttribute.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Diagnostics; - -namespace System.Runtime.Versioning; - -/// -/// Records the operating system (and minimum version) that supports an API. Multiple -/// attributes can be applied to indicate support on multiple operating systems. -/// -/// -/// Callers can apply a -/// or use guards to prevent calls to APIs on unsupported operating systems. -/// A given platform should only be specified once. -/// -[AttributeUsage( - AttributeTargets.Assembly | - AttributeTargets.Class | - AttributeTargets.Constructor | - AttributeTargets.Enum | - AttributeTargets.Event | - AttributeTargets.Field | - AttributeTargets.Interface | - AttributeTargets.Method | - AttributeTargets.Module | - AttributeTargets.Property | - AttributeTargets.Struct, - AllowMultiple = true, - Inherited = false)] -[Conditional("DEBUG")] -internal sealed class SupportedOSPlatformAttribute : OSPlatformAttribute -{ - public SupportedOSPlatformAttribute(string platformName) - : base(platformName) - { - } -} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.NetStandard/System/Text/EncodingExtensions.cs b/src/ComputeSharp.NetStandard/System/Text/EncodingExtensions.cs similarity index 94% rename from src/ComputeSharp.D2D1.NetStandard/System/Text/EncodingExtensions.cs rename to src/ComputeSharp.NetStandard/System/Text/EncodingExtensions.cs index 9be7852d..3ee8ab6c 100644 --- a/src/ComputeSharp.D2D1.NetStandard/System/Text/EncodingExtensions.cs +++ b/src/ComputeSharp.NetStandard/System/Text/EncodingExtensions.cs @@ -1,8 +1,6 @@ -using System; using System.Runtime.InteropServices; -using System.Text; -namespace ComputeSharp.D2D1.NetStandard.System.Text; +namespace System.Text; /// /// A polyfill type that mirrors some methods from on .NET 5. diff --git a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj index f55b64eb..25b0121e 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj +++ b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -17,7 +17,6 @@ - @@ -104,12 +103,10 @@ - - - - + + diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index aa40bb38..9f21db2a 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -39,14 +39,6 @@ - - - - - - - $(NoWarn);CS1591 - diff --git a/src/ComputeSharp/Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs b/src/ComputeSharp/Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs index f5cc3aa7..a4cb2df8 100644 --- a/src/ComputeSharp/Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs +++ b/src/ComputeSharp/Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs @@ -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; diff --git a/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs b/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs index f5990fc8..c6cd4389 100644 --- a/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs +++ b/src/ComputeSharp/Graphics/Extensions/BufferExtensions.cs @@ -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; diff --git a/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs b/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs index c2b76b09..8e3a90a5 100644 --- a/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs +++ b/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.IBufferWriter.cs @@ -15,11 +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; -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; +#if !NET6_0_OR_GREATER +using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers; #endif namespace ComputeSharp.Graphics.Extensions; diff --git a/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.Stream.cs b/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.Stream.cs index ebe50f80..57b348da 100644 --- a/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.Stream.cs +++ b/src/ComputeSharp/Graphics/Extensions/Interop/IWICStreamExtensions.Stream.cs @@ -15,11 +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; -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; +#if !NET6_0_OR_GREATER +using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers; #endif namespace ComputeSharp.Graphics.Extensions; diff --git a/src/ComputeSharp/Graphics/GraphicsDevice.DeviceLost.cs b/src/ComputeSharp/Graphics/GraphicsDevice.DeviceLost.cs index 30203f32..7d12c742 100644 --- a/src/ComputeSharp/Graphics/GraphicsDevice.DeviceLost.cs +++ b/src/ComputeSharp/Graphics/GraphicsDevice.DeviceLost.cs @@ -6,9 +6,6 @@ using ComputeSharp.Core.Extensions; using ComputeSharp.Interop; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp; diff --git a/src/ComputeSharp/Graphics/GraphicsDevice.Execute.cs b/src/ComputeSharp/Graphics/GraphicsDevice.Execute.cs index d9ac5c5f..ea8e6097 100644 --- a/src/ComputeSharp/Graphics/GraphicsDevice.Execute.cs +++ b/src/ComputeSharp/Graphics/GraphicsDevice.Execute.cs @@ -12,9 +12,6 @@ using ComputeSharp.Graphics.Commands.Interop; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using static TerraFX.Interop.DirectX.D3D12_COMMAND_LIST_TYPE; -#if !NET6_0_OR_GREATER -using UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; -#endif namespace ComputeSharp; diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs index acbfb1a9..2ede7bee 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.ID3D12InfoQueue.cs @@ -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; diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs index dad22eed..71813ff1 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs @@ -6,8 +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 UnmanagedCallersOnlyAttribute = ComputeSharp.NetStandard.System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute; +using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers; #endif #pragma warning disable CA1416 diff --git a/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs b/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs index 1f0e0921..fcc39ee1 100644 --- a/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs +++ b/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs @@ -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 diff --git a/src/ComputeSharp/Graphics/Resources/Abstract/Buffer{T}.cs b/src/ComputeSharp/Graphics/Resources/Abstract/Buffer{T}.cs index a2420198..5fb1dcf8 100644 --- a/src/ComputeSharp/Graphics/Resources/Abstract/Buffer{T}.cs +++ b/src/ComputeSharp/Graphics/Resources/Abstract/Buffer{T}.cs @@ -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; diff --git a/src/ComputeSharp/Graphics/Resources/Debug/BufferDebugView{T}.cs b/src/ComputeSharp/Graphics/Resources/Debug/BufferDebugView{T}.cs index 2b1209e6..1ca213a0 100644 --- a/src/ComputeSharp/Graphics/Resources/Debug/BufferDebugView{T}.cs +++ b/src/ComputeSharp/Graphics/Resources/Debug/BufferDebugView{T}.cs @@ -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; diff --git a/src/ComputeSharp/Graphics/Resources/Debug/TransferBufferDebugView{T}.cs b/src/ComputeSharp/Graphics/Resources/Debug/TransferBufferDebugView{T}.cs index ed03ad6b..cee56bee 100644 --- a/src/ComputeSharp/Graphics/Resources/Debug/TransferBufferDebugView{T}.cs +++ b/src/ComputeSharp/Graphics/Resources/Debug/TransferBufferDebugView{T}.cs @@ -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; diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 61c01412..64bd4f0d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,30 @@ + + + + + + all + build;analyzers + + + + + + + + + + + true + true + \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows.D2D1/Windows/shared/uuids/Windows.Manual.cs b/src/TerraFX.Interop.Windows.D2D1/Windows/shared/uuids/Windows.Manual.cs index cd72899d..340eb9b0 100644 --- a/src/TerraFX.Interop.Windows.D2D1/Windows/shared/uuids/Windows.Manual.cs +++ b/src/TerraFX.Interop.Windows.D2D1/Windows/shared/uuids/Windows.Manual.cs @@ -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; diff --git a/src/TerraFX.Interop.Windows/Windows/shared/uuids/Windows.Manual.cs b/src/TerraFX.Interop.Windows/Windows/shared/uuids/Windows.Manual.cs index 9faf951e..31d53d37 100644 --- a/src/TerraFX.Interop.Windows/Windows/shared/uuids/Windows.Manual.cs +++ b/src/TerraFX.Interop.Windows/Windows/shared/uuids/Windows.Manual.cs @@ -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 diff --git a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj index 6edaa669..087bf7db 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj +++ b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj @@ -22,7 +22,6 @@ - diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index 5810d1f6..97dab945 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -37,7 +37,6 @@ -