From 5586b1ff7b53e40caf0483d315b1b238ac97391e Mon Sep 17 00:00:00 2001 From: routersys Date: Wed, 24 Jun 2026 15:40:48 +0900 Subject: [PATCH] =?UTF-8?q?.NET=2010=20=E3=81=A7=E3=81=AE=E3=83=93?= =?UTF-8?q?=E3=83=AB=E3=83=89=E3=82=A8=E3=83=A9=E3=83=BC=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=97=20LangVersion=20=E3=82=92=20preview=20?= =?UTF-8?q?=E3=81=AB=E6=88=BB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/Directory.Build.props | 7 +------ ...dD2D1PixelOptionsTrivialSamplingOnShaderTypeAnalyzer.cs | 2 +- .../InvalidD2DInputDescriptionAttributeUseAnalyzer.cs | 2 +- .../InvalidD2DResourceTextureIndexAttributeUseAnalyzer.cs | 2 +- .../Analyzers/InvalidShaderTypeInputsAnalyzer.cs | 2 +- src/ComputeSharp/Graphics/Helpers/WICFormatHelper.cs | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) 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];