diff --git a/build/Directory.Build.props b/build/Directory.Build.props index 898f5312..ec049f9b 100644 --- a/build/Directory.Build.props +++ b/build/Directory.Build.props @@ -1,12 +1,7 @@ true - - 13.0 + preview enable true diff --git a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2D1PixelOptionsTrivialSamplingOnShaderTypeAnalyzer.cs b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2D1PixelOptionsTrivialSamplingOnShaderTypeAnalyzer.cs index 855370d4..d95237b6 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2D1PixelOptionsTrivialSamplingOnShaderTypeAnalyzer.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2D1PixelOptionsTrivialSamplingOnShaderTypeAnalyzer.cs @@ -73,7 +73,7 @@ public sealed class InvalidD2D1PixelOptionsTrivialSamplingOnShaderTypeAnalyzer : /// The symbol for the [D2DInputSimple] attribute. /// The number of inputs for the shader. /// Whether the shader only has simple inputs. - private static bool IsSimpleInputShader( + private static unsafe bool IsSimpleInputShader( INamedTypeSymbol structDeclarationSymbol, INamedTypeSymbol d2DInputSimpleSymbolAttributeSymbol, int inputCount) diff --git a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DInputDescriptionAttributeUseAnalyzer.cs b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DInputDescriptionAttributeUseAnalyzer.cs index 2a04487d..c674bf7f 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DInputDescriptionAttributeUseAnalyzer.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DInputDescriptionAttributeUseAnalyzer.cs @@ -19,7 +19,7 @@ public sealed class InvalidD2DInputDescriptionAttributeUseAnalyzer : DiagnosticA public override ImmutableArray SupportedDiagnostics { get; } = [OutOfRangeInputDescriptionIndex, RepeatedD2DInputDescriptionIndices]; /// - public override void Initialize(AnalysisContext context) + public override unsafe void Initialize(AnalysisContext context) { context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics); context.EnableConcurrentExecution(); diff --git a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DResourceTextureIndexAttributeUseAnalyzer.cs b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DResourceTextureIndexAttributeUseAnalyzer.cs index 091f8e80..223ae4c4 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DResourceTextureIndexAttributeUseAnalyzer.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidD2DResourceTextureIndexAttributeUseAnalyzer.cs @@ -25,7 +25,7 @@ public sealed class InvalidD2DResourceTextureIndexAttributeUseAnalyzer : Diagnos ]; /// - public override void Initialize(AnalysisContext context) + public override unsafe void Initialize(AnalysisContext context) { context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics); context.EnableConcurrentExecution(); diff --git a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidShaderTypeInputsAnalyzer.cs b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidShaderTypeInputsAnalyzer.cs index 1ffcbe69..6b36923e 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidShaderTypeInputsAnalyzer.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/Diagnostics/Analyzers/InvalidShaderTypeInputsAnalyzer.cs @@ -27,7 +27,7 @@ public sealed class InvalidShaderTypeInputsAnalyzer : DiagnosticAnalyzer ]; /// - public override void Initialize(AnalysisContext context) + public override unsafe void Initialize(AnalysisContext context) { context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics); context.EnableConcurrentExecution(); diff --git a/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs b/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs index 3934af2b..43b8583f 100644 --- a/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs +++ b/src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs @@ -109,7 +109,7 @@ internal static class WICFormatHelper /// The target filename to get the container format for. /// The WIC format container value matching . /// Thrown when the input filename doesn't have a valid file extension. - public static Guid GetForFilename(ReadOnlySpan filename) + public static unsafe Guid GetForFilename(ReadOnlySpan filename) { Span extension = stackalloc char[4];