Add empty ComputeSharp.D2D1Interop.SourceGenerators project

このコミットが含まれているのは:
Sergio Pedri committed 2022-04-24 21:03:45 +02:00
1 親 3da3500a5d
コミット da103dc721
7ファイル変更
+172 -1

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

+15
ファイルの表示
@@ -89,6 +89,8 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.Core.NetStanda
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("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.D2D1Interop.SourceGenerators", "src\ComputeSharp.D2D1Interop.SourceGenerators\ComputeSharp.D2D1Interop.SourceGenerators.csproj", "{E44053BD-A761-47FB-AA78-087A599672EA}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5
@@ -112,6 +114,7 @@ Global
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.Core.NetStandard\ComputeSharp.Core.NetStandard.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
@@ -395,6 +398,18 @@ Global
{BFB003D1-788B-48DE-8065-39479C162CB0}.Release|ARM64.Build.0 = Release|Any CPU
{BFB003D1-788B-48DE-8065-39479C162CB0}.Release|x64.ActiveCfg = Release|Any CPU
{BFB003D1-788B-48DE-8065-39479C162CB0}.Release|x64.Build.0 = Release|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Debug|ARM64.Build.0 = Debug|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Debug|x64.ActiveCfg = Debug|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Debug|x64.Build.0 = Debug|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Release|Any CPU.Build.0 = Release|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Release|ARM64.ActiveCfg = Release|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Release|ARM64.Build.0 = Release|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Release|x64.ActiveCfg = Release|Any CPU
{E44053BD-A761-47FB-AA78-087A599672EA}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackSymbols>false</PackSymbols>
<Description>ComputeSharp.SourceGenerators</Description>
<Description>ComputeSharp.Core.SourceGenerators</Description>
<NoWarn>$(NoWarn);CS1591;CS0649;CS1574</NoWarn>
</PropertyGroup>
+9
ファイルの表示
@@ -0,0 +1,9 @@
; Shipped analyzer releases
; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md
## Release 1.0
### New Rules
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
+2
ファイルの表示
@@ -0,0 +1,2 @@
; Unshipped analyzer release
; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md
@@ -0,0 +1,85 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackSymbols>false</PackSymbols>
<Description>ComputeSharp.D2D1Interop.SourceGenerators</Description>
<NoWarn>$(NoWarn);CS1591;CS0649;CS1574</NoWarn>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);SOURCE_GENERATOR</DefineConstants>
</PropertyGroup>
<!-- Same setup as ComputeSharp.Core.SourceGenerators, just with also APIs from ComputeSharp -->
<ItemGroup>
<!-- ComputeSharp.Core.SourceGenerator APIs -->
<Compile Include="..\ComputeSharp.Core.SourceGenerators\Helpers\HashCode.cs" Link="Helpers\HashCode.cs" />
<!-- ComputeSharp.Core APIs -->
<Compile Include="..\ComputeSharp.Core\Attributes\AutoConstructorAttribute.cs" Link="ComputeSharp.Core\Attributes\AutoConstructorAttribute.cs" />
<Compile Include="..\ComputeSharp.Core\Exceptions\InvalidExecutionContextException.cs" Link="ComputeSharp.Core\Exceptions\InvalidExecutionContextException.cs" />
<Compile Include="..\ComputeSharp.Core\Intrinsics\Attributes\HlslIntrinsicNameAttribute.cs" Link="ComputeSharp.Core\Intrinsics\Attributes\HlslIntrinsicNameAttribute.cs" />
<Compile Include="..\ComputeSharp.Core\Intrinsics\Hlsl.cs" Link="ComputeSharp.Core\Intrinsics\Hlsl.cs" />
<Compile Include="..\ComputeSharp.Core\Intrinsics\Hlsl.g.cs" Link="ComputeSharp.Core\Intrinsics\Hlsl.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\Bool.cs" Link="ComputeSharp.Core\Primitives\Bool\Bool.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\Bool2.cs" Link="ComputeSharp.Core\Primitives\Bool\Bool2.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\Bool3.cs" Link="ComputeSharp.Core\Primitives\Bool\Bool3.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\Bool4.cs" Link="ComputeSharp.Core\Primitives\Bool\Bool4.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\Bool2.g.cs" Link="ComputeSharp.Core\Primitives\Bool\Bool2.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\Bool3.g.cs" Link="ComputeSharp.Core\Primitives\Bool\Bool3.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\Bool4.g.cs" Link="ComputeSharp.Core\Primitives\Bool\Bool4.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Bool\BoolMxN.g.cs" Link="ComputeSharp.Core\Primitives\Bool\BoolMxN.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Double\Double2.cs" Link="ComputeSharp.Core\Primitives\Double\Double2.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Double\Double3.cs" Link="ComputeSharp.Core\Primitives\Double\Double3.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Double\Double4.cs" Link="ComputeSharp.Core\Primitives\Double\Double4.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Double\Double2.g.cs" Link="ComputeSharp.Core\Primitives\Double\Double2.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Double\Double3.g.cs" Link="ComputeSharp.Core\Primitives\Double\Double3.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Double\Double4.g.cs" Link="ComputeSharp.Core\Primitives\Double\Double4.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Double\DoubleMxN.g.cs" Link="ComputeSharp.Core\Primitives\Double\DoubleMxN.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Float\Float2.cs" Link="ComputeSharp.Core\Primitives\Float\Float2.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Float\Float3.cs" Link="ComputeSharp.Core\Primitives\Float\Float3.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Float\Float4.cs" Link="ComputeSharp.Core\Primitives\Float\Float4.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Float\Float2.g.cs" Link="ComputeSharp.Core\Primitives\Float\Float2.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Float\Float3.g.cs" Link="ComputeSharp.Core\Primitives\Float\Float3.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Float\Float4.g.cs" Link="ComputeSharp.Core\Primitives\Float\Float4.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Float\FloatMxN.g.cs" Link="ComputeSharp.Core\Primitives\Float\FloatMxN.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Int\Int2.cs" Link="ComputeSharp.Core\Primitives\Int\Int2.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Int\Int3.cs" Link="ComputeSharp.Core\Primitives\Int\Int3.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Int\Int4.cs" Link="ComputeSharp.Core\Primitives\Int\Int4.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Int\Int2.g.cs" Link="ComputeSharp.Core\Primitives\Int\Int2.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Int\Int3.g.cs" Link="ComputeSharp.Core\Primitives\Int\Int3.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Int\Int4.g.cs" Link="ComputeSharp.Core\Primitives\Int\Int4.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\Int\IntMxN.g.cs" Link="ComputeSharp.Core\Primitives\Int\IntMxN.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\UInt\UInt2.cs" Link="ComputeSharp.Core\Primitives\UInt\UInt2.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\UInt\UInt3.cs" Link="ComputeSharp.Core\Primitives\UInt\UInt3.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\UInt\UInt4.cs" Link="ComputeSharp.Core\Primitives\UInt\UInt4.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\UInt\UInt2.g.cs" Link="ComputeSharp.Core\Primitives\UInt\UInt2.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\UInt\UInt3.g.cs" Link="ComputeSharp.Core\Primitives\UInt\UInt3.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\UInt\UInt4.g.cs" Link="ComputeSharp.Core\Primitives\UInt\UInt4.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\UInt\UIntMxN.g.cs" Link="ComputeSharp.Core\Primitives\UInt\UIntMxN.g.cs" />
<Compile Include="..\ComputeSharp.Core\Primitives\MatrixIndex.cs" Link="ComputeSharp.Core\Primitives\MatrixIndex.cs" />
<!-- ComputeSharp.D2D1Interop APIs -->
<Compile Include="..\ComputeSharp.D2D1Interop\Attributes\Profiles\D2D1ShaderProfile.cs" Link="ComputeSharp.D2D1Interop\Attributes\Profiles\D2D1ShaderProfile.cs" />
<Compile Include="..\ComputeSharp.D2D1Interop\Attributes\D2DEmbeddedBytecodeAttribute.cs" Link="ComputeSharp.D2D1Interop\Attributes\D2DEmbeddedBytecodeAttribute.cs" />
<Compile Include="..\ComputeSharp.D2D1Interop\Attributes\D2DInputComplexAttribute.cs" Link="ComputeSharp.D2D1Interop\Attributes\D2DInputComplexAttribute.cs" />
<Compile Include="..\ComputeSharp.D2D1Interop\Attributes\D2DInputCountAttribute.cs" Link="ComputeSharp.D2D1Interop\Attributes\D2DInputCountAttribute.cs" />
<Compile Include="..\ComputeSharp.D2D1Interop\Attributes\D2DInputSimpleAttribute.cs" Link="ComputeSharp.D2D1Interop\Attributes\D2DInputSimpleAttribute.cs" />
<Compile Include="..\ComputeSharp.D2D1Interop\Attributes\D2DRequiresScenePositionAttribute.cs" Link="ComputeSharp.D2D1Interop\Attributes\D2DRequiresScenePositionAttribute.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" Pack="false" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="AnalyzerReleases.Shipped.md" />
<AdditionalFiles Include="AnalyzerReleases.Unshipped.md" />
</ItemGroup>
<!-- Shared project with .NET Standard 2.0 polyfills -->
<Import Project="..\ComputeSharp.Core.NetStandard\ComputeSharp.Core.NetStandard.projitems" Label="Shared" />
</Project>
+4
ファイルの表示
@@ -1,5 +1,7 @@
using System;
#if !SOURCE_GENERATOR
using ComputeSharp.D2D1Interop.Helpers;
#endif
namespace ComputeSharp.D2D1Interop;
@@ -30,6 +32,7 @@ public sealed class D2DEmbeddedBytecodeAttribute : Attribute
/// <param name="shaderProfile">The target shader profile to use to compile the shader.</param>
public D2DEmbeddedBytecodeAttribute(D2D1ShaderProfile shaderProfile)
{
#if !SOURCE_GENERATOR
ShaderProfile = shaderProfile switch
{
D2D1ShaderProfile.PixelShader40 or
@@ -39,6 +42,7 @@ public sealed class D2DEmbeddedBytecodeAttribute : Attribute
D2D1ShaderProfile.PixelShader50 => shaderProfile,
_ => ThrowHelper.ThrowArgumentException<D2D1ShaderProfile>(nameof(shaderProfile), "Invalid shader profile value.")
};
#endif
}
/// <summary>
+56
ファイルの表示
@@ -0,0 +1,56 @@
<Project>
<!-- Get the analyzer from the ComputeSharp.D2D1Interop NuGet package -->
<Target Name="_ComputeSharpGatherAnalyzers">
<ItemGroup>
<_ComputeSharpAnalyzer Include="@(Analyzer)" Condition="'%(Analyzer.NuGetPackageId)' == 'ComputeSharp.D2D1Interop'" />
</ItemGroup>
</Target>
<!-- Remove the analyzer if using Roslyn 3.x (incremental generators require Roslyn 4.x) -->
<Target Name="_ComputeSharpRemoveAnalyzersForRoslyn3"
Condition="'$(CSharpCoreTargetsPath)' != ''"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
DependsOnTargets="_ComputeSharpGatherAnalyzers">
<!-- Use the CSharpCoreTargetsPath property to find the version of the compiler we are using. This is the same mechanism
MSBuild uses to find the compiler. We could check the assembly version for any compiler assembly (since they all have
the same version) but Microsoft.Build.Tasks.CodeAnalysis.dll is where MSBuild loads the compiler tasks from so if
someone is getting creative with msbuild tasks/targets this is the "most correct" assembly to check. -->
<GetAssemblyIdentity AssemblyFiles="$([System.IO.Path]::Combine(`$([System.IO.Path]::GetDirectoryName($(CSharpCoreTargetsPath)))`,`Microsoft.Build.Tasks.CodeAnalysis.dll`))">
<Output TaskParameter="Assemblies" ItemName="CurrentCompilerAssemblyIdentity"/>
</GetAssemblyIdentity>
<PropertyGroup>
<!-- Transform the resulting item from GetAssemblyIdentity into a property representing its assembly version -->
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.0))">true</CurrentCompilerVersionIsNotNewEnough>
</PropertyGroup>
<!-- If the Roslyn version is < 4.0, disable the source generators -->
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<Analyzer Remove="@(_ComputeSharpAnalyzer)"/>
</ItemGroup>
<!-- If the source generators are disabled, also emit an error. This would've been produced by MSBuild itself as well, but
emitting this manually lets us customize the message to inform developers as to why exactly the generators have been
disabled, and that ComputeSharp will not work at all unless a more up to date IDE or compiler version are used. -->
<Error Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'" Text="The ComputeSharp.D2D1Interop source generators have been disabled on the current configuration, as they need Roslyn 4.x in order to work. ComputeSharp.D2D1Interop requires the source generators to run in order to process shaders, so the library cannot be used without a more up to date IDE (eg. VS2022) or .NET SDK version."/>
</Target>
<!-- Remove the analyzer if Roslyn is missing -->
<Target Name="_ComputeSharpRemoveAnalyzersForRosynNotFound"
Condition="'$(CSharpCoreTargetsPath)' == ''"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
DependsOnTargets="_ComputeSharpGatherAnalyzers">
<!-- If no Roslyn assembly could be found, just remove the analyzer without emitting a warning -->
<ItemGroup>
<Analyzer Remove="@(_ComputeSharpAnalyzer)"/>
</ItemGroup>
</Target>
</Project>