diff --git a/.editorconfig b/.editorconfig index bcfa1529..cdf31601 100644 --- a/.editorconfig +++ b/.editorconfig @@ -95,6 +95,11 @@ dotnet_style_prefer_inferred_tuple_names = true:warning dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning csharp_style_implicit_object_creation_when_type_is_apparent = true:warning +# Disable 'Use collection expression for fluent (IDE0305)'. The rationale is that it's that collection +# expressions can be hard to read when having sequences of multiple chained fluent invocations (eg. LINQ). +# See: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0305. +dotnet_style_prefer_collection_expression = false + # Field preferences dotnet_style_readonly_field = true:warning diff --git a/.globalconfig b/.globalconfig index 06d62109..b466f2aa 100644 --- a/.globalconfig +++ b/.globalconfig @@ -69,11 +69,9 @@ dotnet_diagnostic.CA2242.severity = warning dotnet_diagnostic.IDE0010.severity = none dotnet_diagnostic.IDE0130.severity = none -dotnet_diagnostic.IDE0060.severity = none dotnet_diagnostic.IDE1006.severity = warning dotnet_diagnostic.IDE0023.severity = none dotnet_diagnostic.IDE0024.severity = none -dotnet_diagnostic.IDE0060.severity = none dotnet_diagnostic.IDE0057.severity = none dotnet_diagnostic.IDE0046.severity = none dotnet_diagnostic.IDE0072.severity = none diff --git a/build/Directory.Build.props b/build/Directory.Build.props index ce6cb7bc..cb5ae82b 100644 --- a/build/Directory.Build.props +++ b/build/Directory.Build.props @@ -59,12 +59,6 @@ since in order to use these APIs the caller already has to be in an unsafe context. --> $(NoWarn);CS8500 - - - $(NoWarn);NETSDK1219 diff --git a/global.json b/global.json index 00b67cae..44421f12 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100", + "version": "9.0.200", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj b/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj index 18cc2bb3..696ff564 100644 --- a/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj +++ b/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj @@ -19,7 +19,7 @@ - + diff --git a/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj b/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj index a7ed7889..0a11e814 100644 --- a/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj +++ b/samples/ComputeSharp.ImageProcessing/ComputeSharp.ImageProcessing.csproj @@ -9,7 +9,7 @@ - + diff --git a/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj b/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj index 74965e31..7b37750b 100644 --- a/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj +++ b/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj @@ -7,7 +7,7 @@ - + diff --git a/samples/ComputeSharp.SwapChain.Cli/ComputeSharp.SwapChain.Cli.csproj b/samples/ComputeSharp.SwapChain.Cli/ComputeSharp.SwapChain.Cli.csproj index 48c19d52..5eae7e40 100644 --- a/samples/ComputeSharp.SwapChain.Cli/ComputeSharp.SwapChain.Cli.csproj +++ b/samples/ComputeSharp.SwapChain.Cli/ComputeSharp.SwapChain.Cli.csproj @@ -58,7 +58,7 @@ - + diff --git a/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj b/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj index 46de6d6a..57c6b207 100644 --- a/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj +++ b/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj @@ -60,7 +60,7 @@ - + + 1.3.20250314.1 diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1/ProteanClouds.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1/ProteanClouds.cs index 957435b6..b77f1b67 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1/ProteanClouds.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1/ProteanClouds.cs @@ -67,7 +67,7 @@ internal readonly partial struct ProteanClouds(float time, int2 dispatchSize) : return new float2(d + (cl * 0.2f) + 0.25f, cl); } - private float4 Render(float3 ro, float3 rd, float time, float prm1, float2 bsMo) + private float4 Render(float3 ro, float3 rd, float prm1, float2 bsMo) { float4 rez = 0; float t = 1.5f; @@ -162,7 +162,7 @@ internal readonly partial struct ProteanClouds(float time, int2 dispatchSize) : rd.XY = Hlsl.Mul(rd.XY, Rotate((-Disp(scaledTime + 3.5f).X * 0.2f) + bsMo.X)); float prm1 = Hlsl.SmoothStep(-0.4f, 0.4f, Hlsl.Sin(time * 0.3f)); - float4 scn = Render(ro, rd, scaledTime, prm1, bsMo); + float4 scn = Render(ro, rd, prm1, bsMo); float3 col = scn.RGB; col = ILerp(col.BGR, col.RGB, Hlsl.Clamp(1.0f - prm1, 0.05f, 1.0f)); diff --git a/samples/ComputeSharp.SwapChain.Shaders/ProteanClouds.cs b/samples/ComputeSharp.SwapChain.Shaders/ProteanClouds.cs index 2c56510d..7dd21251 100644 --- a/samples/ComputeSharp.SwapChain.Shaders/ProteanClouds.cs +++ b/samples/ComputeSharp.SwapChain.Shaders/ProteanClouds.cs @@ -62,7 +62,7 @@ internal readonly partial struct ProteanClouds(float time) : IComputeShader + WinExe net8.0-windows10.0.26100.0 @@ -15,15 +15,10 @@ false - - - - - + + 1.3.20250314.1 + @@ -49,12 +44,12 @@ - - + + - + diff --git a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj index 914468cc..4a119c36 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj +++ b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj @@ -51,8 +51,8 @@ - - + + diff --git a/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj b/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj index ff0fac42..ac8219e0 100644 --- a/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj +++ b/samples/ComputeSharp.SwapChain/ComputeSharp.SwapChain.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.cs b/src/ComputeSharp.Core/Intrinsics/Hlsl.cs index 33c85335..cf79c72c 100644 --- a/src/ComputeSharp.Core/Intrinsics/Hlsl.cs +++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.cs @@ -1,6 +1,6 @@ using ComputeSharp.Core.Intrinsics; -#pragma warning disable IDE0022 +#pragma warning disable IDE0022, IDE0060 namespace ComputeSharp; diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool.cs index 84136a95..b397f566 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool.cs @@ -1,6 +1,8 @@ using System; using System.Runtime.InteropServices; +#pragma warning disable IDE0060 + namespace ComputeSharp; /// diff --git a/src/ComputeSharp.D2D1.UI.SourceGenerators/CanvasEffectPropertyGenerator.Execute.cs b/src/ComputeSharp.D2D1.UI.SourceGenerators/CanvasEffectPropertyGenerator.Execute.cs index 169f8e97..703023e8 100644 --- a/src/ComputeSharp.D2D1.UI.SourceGenerators/CanvasEffectPropertyGenerator.Execute.cs +++ b/src/ComputeSharp.D2D1.UI.SourceGenerators/CanvasEffectPropertyGenerator.Execute.cs @@ -59,6 +59,8 @@ partial class CanvasEffectPropertyGenerator return false; } + token.ThrowIfCancellationRequested(); + // The property must be in a type with a base type (as it must derive from CanvasEffect) return node.Parent?.IsTypeDeclarationWithOrPotentiallyWithBaseTypes() == true; } diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffect.cs b/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffect.cs index 23805744..34282d13 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffect.cs +++ b/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffect.cs @@ -145,7 +145,7 @@ unsafe partial class PixelShaderEffect Span> canvasEffects = sourceEffects.Length <= 16 ? stackalloc ComPtr[16] : MemoryMarshal.Cast>( - canvasEffectsAbiArray = ArrayPool.Shared.Rent(sourceEffects.Length)); + (canvasEffectsAbiArray = ArrayPool.Shared.Rent(sourceEffects.Length)).AsSpan()); // Clear the span to ensure no false positives are accidentally disposed canvasEffects.Clear(); diff --git a/src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj b/src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj index ec4ab062..2ea2b6f8 100644 --- a/src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj +++ b/src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj b/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj index 4f17a1aa..3d64e79b 100644 --- a/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj +++ b/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs index 99309334..7b442015 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Effects/PixelShaderEffect.ID2D1EffectImplMethods.cs @@ -6,6 +6,8 @@ using ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers; using ComputeSharp.D2D1.Shaders.Interop.Extensions; using ComputeSharp.Win32; +#pragma warning disable IDE0060 + namespace ComputeSharp.D2D1.Interop.Effects; /// diff --git a/src/ComputeSharp.SourceGeneration/Helpers/EquatableArray{T}.cs b/src/ComputeSharp.SourceGeneration/Helpers/EquatableArray{T}.cs index 13c94114..b63b1c87 100644 --- a/src/ComputeSharp.SourceGeneration/Helpers/EquatableArray{T}.cs +++ b/src/ComputeSharp.SourceGeneration/Helpers/EquatableArray{T}.cs @@ -81,19 +81,19 @@ internal readonly struct EquatableArray(ImmutableArray array) : IEquatable get => AsImmutableArray().Length; } - /// + /// public bool Equals(EquatableArray array) { return AsSpan().SequenceEqual(array.AsSpan()); } - /// + /// public override bool Equals(object? obj) { return obj is EquatableArray array && Equals(this, array); } - /// + /// public override unsafe int GetHashCode() { if (this.array is not T[] array) @@ -174,13 +174,13 @@ internal readonly struct EquatableArray(ImmutableArray array) : IEquatable return AsImmutableArray().GetEnumerator(); } - /// + /// IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)AsImmutableArray()).GetEnumerator(); } - /// + /// IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)AsImmutableArray()).GetEnumerator(); diff --git a/src/ComputeSharp.SourceGeneration/Helpers/ImmutableArrayBuilder{T}.cs b/src/ComputeSharp.SourceGeneration/Helpers/ImmutableArrayBuilder{T}.cs index a5663530..b721f1a1 100644 --- a/src/ComputeSharp.SourceGeneration/Helpers/ImmutableArrayBuilder{T}.cs +++ b/src/ComputeSharp.SourceGeneration/Helpers/ImmutableArrayBuilder{T}.cs @@ -229,12 +229,6 @@ internal struct ImmutableArrayBuilder : IDisposable this.index += items.Length; } - /// - public void Clear(ReadOnlySpan items) - { - this.index = 0; - } - /// public void Insert(int index, T item) { @@ -254,9 +248,7 @@ internal struct ImmutableArrayBuilder : IDisposable this.index++; } - /// - /// Clears the items in the current writer. - /// + /// public void Clear() { if (typeof(T) != typeof(byte) && diff --git a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs index 9bfdb248..86181dc9 100644 --- a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs +++ b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs @@ -8,7 +8,7 @@ using System.Globalization; using System.Runtime.CompilerServices; using System.Text; -#pragma warning disable IDE0290 +#pragma warning disable IDE0060, IDE0290 namespace ComputeSharp.SourceGeneration.Helpers; diff --git a/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs b/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs index 1821dbdd..066e1835 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs +++ b/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs @@ -84,7 +84,6 @@ partial class ComputeShaderDescriptorGenerator token.ThrowIfCancellationRequested(); ImmutableArray sharedBuffers = GetSharedBuffers( - diagnostics, structDeclarationSymbol, discoveredTypes); @@ -323,12 +322,10 @@ partial class ComputeShaderDescriptorGenerator /// /// Gets a sequence of captured members and their mapped names. /// - /// The collection of produced instances. /// The input instance to process. /// The collection of currently discovered types. /// A sequence of captured members in . private static ImmutableArray GetSharedBuffers( - ImmutableArrayBuilder diagnostics, INamedTypeSymbol structDeclarationSymbol, ICollection types) { diff --git a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj index 83a5653d..5b8de2c4 100644 --- a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj +++ b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj @@ -14,7 +14,7 @@ - + diff --git a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj index 29769ee4..9246077b 100644 --- a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj +++ b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj @@ -4,7 +4,7 @@ - + diff --git a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj index f37d96e3..ef45299f 100644 --- a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj +++ b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj @@ -13,11 +13,14 @@ - - + + + + + diff --git a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderDescriptorGenerator_Analyzers.cs b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderDescriptorGenerator_Analyzers.cs index 71a93b3d..cc3c4a79 100644 --- a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderDescriptorGenerator_Analyzers.cs +++ b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderDescriptorGenerator_Analyzers.cs @@ -1003,10 +1003,7 @@ public class Test_D2DPixelShaderDescriptorGenerator_Analyzers } [TestMethod] - [DataRow(-1)] - [DataRow(6)] - [DataRow(int.MaxValue)] - public async Task OutOfRangeInputIndex_OutOfRange_BothInputTypes_WarnsOnce(int inputIndex) + public async Task OutOfRangeInputIndex_OutOfRange_BothInputTypes_WarnsOnce() { const string source = """ using ComputeSharp.D2D1; diff --git a/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj b/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj index 1412fcfd..b24f528c 100644 --- a/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj +++ b/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators.csproj b/tests/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators.csproj index ffec8f2d..490e5964 100644 --- a/tests/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators.csproj +++ b/tests/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators/ComputeSharp.D2D1.WinUI.Tests.SourceGenerators.csproj @@ -12,11 +12,15 @@ - - + + + + + + diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj index db2aa730..d67d60f6 100644 --- a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj @@ -58,9 +58,9 @@ - - - + + + diff --git a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj index 0c98c91e..eba56d96 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj +++ b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj b/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj index b0762f1a..ae8bf2d4 100644 --- a/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj +++ b/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj @@ -5,7 +5,7 @@ - + diff --git a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj index d6da468a..95e1ed69 100644 --- a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj +++ b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj @@ -5,7 +5,7 @@ - + diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj b/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj index bd9b59f9..99ae19e5 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj @@ -4,7 +4,7 @@ - + diff --git a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj index 303fa325..91905fb9 100644 --- a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj +++ b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj @@ -7,10 +7,13 @@ - + - + + + + diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index a031f3f0..f849014c 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -11,9 +11,9 @@ - - - + + + diff --git a/tests/ComputeSharp.Tests/ShaderCompilerTests.cs b/tests/ComputeSharp.Tests/ShaderCompilerTests.cs index 9ee52faf..0301f516 100644 --- a/tests/ComputeSharp.Tests/ShaderCompilerTests.cs +++ b/tests/ComputeSharp.Tests/ShaderCompilerTests.cs @@ -5,7 +5,7 @@ using ComputeSharp.Interop; using ComputeSharp.Tests.Misc; using Microsoft.VisualStudio.TestTools.UnitTesting; -#pragma warning disable IDE0008, IDE0022, IDE0009, IDE0290 +#pragma warning disable IDE0008, IDE0022, IDE0009, IDE0060, IDE0290 namespace ComputeSharp.Tests { diff --git a/tests/ComputeSharp.Tests/Shaders/Compute/ProteanClouds.cs b/tests/ComputeSharp.Tests/Shaders/Compute/ProteanClouds.cs index 4241bad0..8494a3bd 100644 --- a/tests/ComputeSharp.Tests/Shaders/Compute/ProteanClouds.cs +++ b/tests/ComputeSharp.Tests/Shaders/Compute/ProteanClouds.cs @@ -74,7 +74,7 @@ internal readonly partial struct ProteanClouds : IComputeShader return new float2(d + cl * 0.2f + 0.25f, cl); } - private float4 Render(float3 ro, float3 rd, float time, float prm1, float2 bsMo) + private float4 Render(float3 ro, float3 rd, float prm1, float2 bsMo) { float4 rez = 0; float t = 1.5f; @@ -165,7 +165,7 @@ internal readonly partial struct ProteanClouds : IComputeShader rd.XY = Hlsl.Mul(rd.XY, Rotate(-Disp(scaledTime + 3.5f).X * 0.2f + bsMo.X)); float prm1 = Hlsl.SmoothStep(-0.4f, 0.4f, Hlsl.Sin(time * 0.3f)); - float4 scn = Render(ro, rd, scaledTime, prm1, bsMo); + float4 scn = Render(ro, rd, prm1, bsMo); float3 col = scn.RGB; col = ILerp(col.BGR, col.RGB, Hlsl.Clamp(1.0f - prm1, 0.05f, 1.0f));