Merge pull request #397 from Sergio0694/dev/skip-locals-init
Enable [SkipLocalsInit] for all libraries
このコミットが含まれているのは:
16ファイル変更
+91
-73
検索条件に一致するファイルはありません
@@ -6,11 +6,14 @@
|
||||
<DocumentationFile>ComputeSharp.Core.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Enable trimming support on .NET 6 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="ComputeSharp" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.Dynamic" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.Pix" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.Uwp" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.WinUI" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.D2D1" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- .NET Standard 2.0 polyfill packages -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[module: SkipLocalsInit]
|
||||
|
||||
[assembly: InternalsVisibleTo("ComputeSharp")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Dynamic")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Uwp")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.WinUI")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.D2D1")]
|
||||
@@ -99,6 +99,9 @@ partial class ID2D1ShaderGenerator
|
||||
Span<bool> selectedSimpleInputIndices = stackalloc bool[8];
|
||||
Span<bool> selectedComplexInputIndices = stackalloc bool[8];
|
||||
|
||||
selectedSimpleInputIndices.Clear();
|
||||
selectedComplexInputIndices.Clear();
|
||||
|
||||
// All simple indices must be unique
|
||||
foreach (int index in inputSimpleIndicesBuilder.WrittenSpan)
|
||||
{
|
||||
|
||||
+2
@@ -76,6 +76,8 @@ partial class ID2D1ShaderGenerator
|
||||
|
||||
Span<bool> selectedInputDescriptionIndices = stackalloc bool[8];
|
||||
|
||||
selectedInputDescriptionIndices.Clear();
|
||||
|
||||
// All input description indices must be unique
|
||||
foreach (InputDescription inputDescription in inputDescriptionsBuilder.WrittenSpan)
|
||||
{
|
||||
|
||||
+2
@@ -115,6 +115,8 @@ partial class ID2D1ShaderGenerator
|
||||
|
||||
Span<bool> selectedResourceTextureIndices = stackalloc bool[16];
|
||||
|
||||
selectedResourceTextureIndices.Clear();
|
||||
|
||||
// All input description indices must be unique (also take this path for invalid indices)
|
||||
foreach ((int? index, _) in resourceTextureInfos.WrittenSpan)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DocumentationFile>ComputeSharp.D2D1.xml</DocumentationFile>
|
||||
<SupportedOSVersion>windows6.1</SupportedOSVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -33,12 +34,6 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Enable trimming support on .NET 6 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- 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" />
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
[module: SkipLocalsInit]
|
||||
|
||||
[assembly: SupportedOSPlatform("windows6.1")]
|
||||
@@ -4,13 +4,12 @@
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DocumentationFile>ComputeSharp.Dynamic.xml</DocumentationFile>
|
||||
<Platforms>AnyCPU;x64;ARM64</Platforms>
|
||||
<SupportedOSVersion>windows6.2</SupportedOSVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Enable trimming support on .NET 6 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="ComputeSharp.Tests.Internals" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Reference to the main non-dynamic library-->
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
[module: SkipLocalsInit]
|
||||
|
||||
[assembly: SupportedOSPlatform("windows6.2")]
|
||||
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Tests.Internals")]
|
||||
@@ -4,12 +4,7 @@
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DocumentationFile>ComputeSharp.Pix.xml</DocumentationFile>
|
||||
<Platforms>AnyCPU;x64;ARM64</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Enable trimming support on .NET 6 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
<SupportedOSVersion>windows6.2</SupportedOSVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Reference to the main library-->
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
[assembly: SupportedOSPlatform("windows6.2")]
|
||||
@@ -1,6 +1,3 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[module: SkipLocalsInit]
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
@@ -1,3 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[module: SkipLocalsInit]
|
||||
@@ -3,13 +3,16 @@
|
||||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DocumentationFile>ComputeSharp.xml</DocumentationFile>
|
||||
<SupportedOSVersion>windows6.2</SupportedOSVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Enable trimming support on .NET 6 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="ComputeSharp.Dynamic" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.Pix" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.Uwp" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.WinUI" />
|
||||
<InternalsVisibleTo Include="ComputeSharp.Tests.Internals" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ComputeSharp.Core\ComputeSharp.Core.csproj" />
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
[module: SkipLocalsInit]
|
||||
|
||||
[assembly: SupportedOSPlatform("windows6.2")]
|
||||
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Dynamic")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Pix")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Uwp")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.WinUI")]
|
||||
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Tests.Internals")]
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<Import Project="..\Directory.Build.targets" />
|
||||
|
||||
<Target Name="ConfigureAssemblyTrimmingIfNeeded"
|
||||
BeforeTargets="PrepareForBuild">
|
||||
|
||||
<!-- Enable trimming support on .NET 6 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
|
||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="EmitSupportedOSVersionAttributeForTargetOS"
|
||||
BeforeTargets="PrepareForBuild">
|
||||
|
||||
<!-- Emit the [SupportedOSVersion] attribute if needed -->
|
||||
<ItemGroup Condition="'$(SupportedOSVersion)' != ''">
|
||||
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatformAttribute">
|
||||
<_Parameter1>$(SupportedOSVersion)</_Parameter1>
|
||||
</AssemblyAttribute>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
The following target has been ported from TerraFX.Interop.Windows.
|
||||
See: https://github.com/terrafx/terrafx.interop.windows.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<GeneratedSkipLocalsInitFile Condition="'$(GeneratedSkipLocalsInitFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).SkipLocalsInit.g.cs</GeneratedSkipLocalsInitFile>
|
||||
<GeneratedSkipLocalsInitFileLines>
|
||||
<![CDATA[//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
[module: System.Runtime.CompilerServices.SkipLocalsInitAttribute]]]>
|
||||
</GeneratedSkipLocalsInitFileLines>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateSkipLocalsInit"
|
||||
BeforeTargets="BeforeCompile;CoreCompile"
|
||||
DependsOnTargets="PrepareForBuild"
|
||||
Condition="'$(Language)' == 'C#'"
|
||||
Inputs="$(MSBuildAllProjects)"
|
||||
Outputs="$(GeneratedSkipLocalsInitFile)">
|
||||
|
||||
<!-- Write the file with the attribute -->
|
||||
<WriteLinesToFile Lines="$(GeneratedSkipLocalsInitFileLines)" Overwrite="true" WriteOnlyWhenDifferent="true" File="$(GeneratedSkipLocalsInitFile)" />
|
||||
|
||||
<!-- Include the generated file in the list of files to compile -->
|
||||
<ItemGroup>
|
||||
<Compile Include="$(GeneratedSkipLocalsInitFile)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
新しいイシューから参照
ユーザーをブロックする