diff --git a/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs b/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs index 831bcb05..dd2e7f86 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs @@ -480,8 +480,6 @@ partial class D2DPixelShaderDescriptorGenerator { using IndentedTextWriter writer = new(); - HlslSourceSyntaxProcessor.WriteHeader(writer); - // Shader metadata writer.WriteLine($"#define D2D_INPUT_COUNT {inputCount}"); diff --git a/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxProcessors/HlslSourceSyntaxProcessor.cs b/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxProcessors/HlslSourceSyntaxProcessor.cs index 27823c55..b3657ac9 100644 --- a/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxProcessors/HlslSourceSyntaxProcessor.cs +++ b/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxProcessors/HlslSourceSyntaxProcessor.cs @@ -8,23 +8,6 @@ namespace ComputeSharp.SourceGeneration.SyntaxProcessors; /// internal static class HlslSourceSyntaxProcessor { - /// - /// Writes the header included at the top of each generated HLSL shader. - /// - /// The instance to write into. - public static void WriteHeader(IndentedTextWriter writer) - { - writer.WriteLine(""" - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - """, isMultiline: true); - - writer.WriteLine(); - } - /// /// Writes the top declarations in each generated HLSL shader: /// diff --git a/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs b/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs index 48d351d6..a44e4464 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs +++ b/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs @@ -521,8 +521,6 @@ partial class ComputeShaderDescriptorGenerator { using IndentedTextWriter writer = new(); - HlslSourceSyntaxProcessor.WriteHeader(writer); - // Group size constants writer.WriteLine($"#define __GroupSize__get_X {threadsX}"); writer.WriteLine($"#define __GroupSize__get_Y {threadsY}"); diff --git a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderSourceGenerator.cs b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderSourceGenerator.cs index ef7fdf3c..9fd032a4 100644 --- a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderSourceGenerator.cs +++ b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/Test_D2DPixelShaderSourceGenerator.cs @@ -185,12 +185,6 @@ public class Test_D2DPixelShaderSourceGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.D2D1.Descriptors.ID2D1PixelShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #define D2D_REQUIRES_SCENE_POSITION @@ -487,12 +481,6 @@ public class Test_D2DPixelShaderSourceGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.D2D1.Descriptors.ID2D1PixelShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #define D2D_REQUIRES_SCENE_POSITION @@ -841,12 +829,6 @@ public class Test_D2DPixelShaderSourceGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.D2D1.Descriptors.ID2D1PixelShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #define D2D_REQUIRES_SCENE_POSITION @@ -1141,12 +1123,6 @@ public class Test_D2DPixelShaderSourceGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.D2D1.Descriptors.ID2D1PixelShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #define D2D_REQUIRES_SCENE_POSITION @@ -1438,12 +1414,6 @@ public class Test_D2DPixelShaderSourceGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.D2D1.Descriptors.ID2D1PixelShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 2 #define D2D_INPUT0_SIMPLE #define D2D_INPUT1_COMPLEX @@ -1727,12 +1697,6 @@ public class Test_D2DPixelShaderSourceGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.D2D1.Descriptors.ID2D1PixelShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #define D2D_REQUIRES_SCENE_POSITION diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs index 6245c859..d9fd2adf 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs @@ -19,12 +19,6 @@ public partial class D2D1ReflectionServicesTests Assert.IsNotNull(shaderInfo.CompilerVersion); Assert.AreEqual(""" - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 3 #define D2D_INPUT0_SIMPLE #define D2D_INPUT1_COMPLEX @@ -103,12 +97,6 @@ public partial class D2D1ReflectionServicesTests Assert.IsNotNull(shaderInfo.CompilerVersion); Assert.AreEqual(""" - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 1 #include "d2d1effecthelpers.hlsli" diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1ShaderCompilerTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1ShaderCompilerTests.cs index c8bc44c0..2337dd38 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1ShaderCompilerTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1ShaderCompilerTests.cs @@ -236,12 +236,6 @@ public partial class D2D1ShaderCompilerTests public void CompileShaderWithWarning() { const string source = """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #include "d2d1effecthelpers.hlsli" @@ -268,12 +262,6 @@ public partial class D2D1ShaderCompilerTests public void CompileShaderWithWarning_Suppressed() { const string source = """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #include "d2d1effecthelpers.hlsli" diff --git a/tests/ComputeSharp.D2D1.Tests/ShaderRewriterTests.cs b/tests/ComputeSharp.D2D1.Tests/ShaderRewriterTests.cs index 5a19fc7e..88978d8c 100644 --- a/tests/ComputeSharp.D2D1.Tests/ShaderRewriterTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/ShaderRewriterTests.cs @@ -15,12 +15,6 @@ public partial class ShaderRewriterTests D2D1ShaderInfo shaderInfo = D2D1ReflectionServices.GetShaderInfo(); Assert.AreEqual(""" - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define D2D_INPUT_COUNT 0 #include "d2d1effecthelpers.hlsli" diff --git a/tests/ComputeSharp.Tests.SourceGenerators/Test_ComputeShaderDescriptorGenerator.cs b/tests/ComputeSharp.Tests.SourceGenerators/Test_ComputeShaderDescriptorGenerator.cs index 4ddd5cf4..e9bfd73f 100644 --- a/tests/ComputeSharp.Tests.SourceGenerators/Test_ComputeShaderDescriptorGenerator.cs +++ b/tests/ComputeSharp.Tests.SourceGenerators/Test_ComputeShaderDescriptorGenerator.cs @@ -97,12 +97,6 @@ public class Test_ComputeShaderDescriptorGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.Descriptors.IComputeShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 8 #define __GroupSize__get_Y 8 #define __GroupSize__get_Z 1 @@ -395,12 +389,6 @@ public class Test_ComputeShaderDescriptorGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.Descriptors.IComputeShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 8 #define __GroupSize__get_Y 8 #define __GroupSize__get_Z 1 @@ -663,12 +651,6 @@ public class Test_ComputeShaderDescriptorGenerator [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] static string global::ComputeSharp.Descriptors.IComputeShaderDescriptor.HlslSource => """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 8 #define __GroupSize__get_Y 8 #define __GroupSize__get_Z 1 diff --git a/tests/ComputeSharp.Tests/ShaderCompilerTests.cs b/tests/ComputeSharp.Tests/ShaderCompilerTests.cs index 7cdcdab3..49dee3aa 100644 --- a/tests/ComputeSharp.Tests/ShaderCompilerTests.cs +++ b/tests/ComputeSharp.Tests/ShaderCompilerTests.cs @@ -615,12 +615,6 @@ namespace ComputeSharp.Tests Assert.AreEqual( """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 64 #define __GroupSize__get_Y 1 #define __GroupSize__get_Z 1 @@ -713,12 +707,6 @@ namespace ComputeSharp.Tests Assert.AreEqual( """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 64 #define __GroupSize__get_Y 1 #define __GroupSize__get_Z 1 @@ -795,12 +783,6 @@ namespace ComputeSharp.Tests Assert.AreEqual( """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 64 #define __GroupSize__get_Y 1 #define __GroupSize__get_Z 1 @@ -880,12 +862,6 @@ namespace ComputeSharp.Tests Assert.AreEqual( """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 64 #define __GroupSize__get_Y 1 #define __GroupSize__get_Z 1 @@ -977,12 +953,6 @@ namespace ComputeSharp.Tests Assert.AreEqual( """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 64 #define __GroupSize__get_Y 1 #define __GroupSize__get_Z 1 @@ -1202,12 +1172,6 @@ namespace ComputeSharp.Tests Assert.AreEqual( """ - // ================================================ - // AUTO GENERATED - // ================================================ - // This shader was created by ComputeSharp. - // See: https://github.com/Sergio0694/ComputeSharp. - #define __GroupSize__get_X 64 #define __GroupSize__get_Y 1 #define __GroupSize__get_Z 1