From 9d0b4326bd2b03159ce01efc77fce7252c02ec8b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 4 Dec 2021 11:57:14 +0100 Subject: [PATCH] Remove unnecessary CreateTryGetBytecodeMethod parameter --- .../IShaderGenerator.CreateTryGetBytecodeMethod.cs | 1 - src/ComputeSharp.SourceGenerators/IShaderGenerator.cs | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ComputeSharp.SourceGenerators/IShaderGenerator.CreateTryGetBytecodeMethod.cs b/src/ComputeSharp.SourceGenerators/IShaderGenerator.CreateTryGetBytecodeMethod.cs index 9d9e6f7e..705f2b2f 100644 --- a/src/ComputeSharp.SourceGenerators/IShaderGenerator.CreateTryGetBytecodeMethod.cs +++ b/src/ComputeSharp.SourceGenerators/IShaderGenerator.CreateTryGetBytecodeMethod.cs @@ -30,7 +30,6 @@ public sealed partial class IShaderGenerator /// private static partial MethodDeclarationSyntax CreateTryGetBytecodeMethod( GeneratorExecutionContext context, - StructDeclarationSyntax structDeclaration, INamedTypeSymbol structDeclarationSymbol, bool isDynamicShader, string hlslSource, diff --git a/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs b/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs index 446f8936..cf231bf6 100644 --- a/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs +++ b/src/ComputeSharp.SourceGenerators/IShaderGenerator.cs @@ -60,7 +60,7 @@ public sealed partial class IShaderGenerator : ISourceGenerator MethodDeclarationSyntax loadDispatchDataMethod = CreateLoadDispatchDataMethod(context, structDeclarationSymbol, out var discoveredResources, out int root32BitConstants); MethodDeclarationSyntax buildHlslStringMethod = CreateBuildHlslStringMethod(context, structDeclaration, structDeclarationSymbol, out string? implicitTextureType, out bool isSamplerUsed, out string hlslSource); MethodDeclarationSyntax loadDispatchMetadataMethod = CreateLoadDispatchMetadataMethod(implicitTextureType, discoveredResources, root32BitConstants, isSamplerUsed); - MethodDeclarationSyntax tryGetBytecodeMethod = CreateTryGetBytecodeMethod(context, structDeclaration, structDeclarationSymbol, isDynamicShader, hlslSource, out string? bytecodeLiterals); + MethodDeclarationSyntax tryGetBytecodeMethod = CreateTryGetBytecodeMethod(context, structDeclarationSymbol, isDynamicShader, hlslSource, out string? bytecodeLiterals); // Reorder the method declarations to respect the order in the interface definition MethodDeclarationSyntax[] methods = @@ -210,15 +210,13 @@ public sealed partial class IShaderGenerator : ISourceGenerator /// Creates a instance for the TryGetBytecode method. /// /// The input instance to use. - /// The node to process. - /// The for . + /// The for the shader type. /// Indicates whether or not the shader is dynamic (ie. captures delegates). /// The generated HLSL source code (ignoring captured delegates, if present). /// The resulting bytecode literals to insert into the final source code. /// The resulting instance for the BuildHlslString method. private static partial MethodDeclarationSyntax CreateTryGetBytecodeMethod( GeneratorExecutionContext context, - StructDeclarationSyntax structDeclaration, INamedTypeSymbol structDeclarationSymbol, bool isDynamicShader, string hlslSource,