diff --git a/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs b/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs index e61493bf..1c346c43 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs +++ b/src/ComputeSharp.SourceGenerators/ComputeShaderDescriptorGenerator.HlslSource.cs @@ -60,7 +60,7 @@ partial class ComputeShaderDescriptorGenerator Dictionary constantDefinitions = new(SymbolEqualityComparer.Default); // Setup the semantic model and basic properties - INamedTypeSymbol? pixelShaderSymbol = structDeclarationSymbol.AllInterfaces.FirstOrDefault(static interfaceSymbol => interfaceSymbol is { IsGenericType: true, Name: nameof(IComputeShader) }); + INamedTypeSymbol? pixelShaderSymbol = structDeclarationSymbol.AllInterfaces.FirstOrDefault(static interfaceSymbol => interfaceSymbol is { IsGenericType: true, Name: "IComputeShader" }); bool isComputeShader = pixelShaderSymbol is null; string? implicitTextureType = isComputeShader ? null : HlslKnownTypes.GetMappedNameForPixelShaderType(pixelShaderSymbol!); @@ -391,12 +391,12 @@ partial class ComputeShaderDescriptorGenerator bool isShaderEntryPoint = (isComputeShader && - methodSymbol.Name == nameof(IComputeShader.Execute) && + methodSymbol.Name == "Execute" && methodSymbol.ReturnsVoid && methodSymbol.TypeParameters.Length == 0 && methodSymbol.Parameters.Length == 0) || (!isComputeShader && - methodSymbol.Name == nameof(IComputeShader.Execute) && + methodSymbol.Name == "Execute" && methodSymbol.ReturnType is not null && // TODO: match for pixel type methodSymbol.TypeParameters.Length == 0 && methodSymbol.Parameters.Length == 0); diff --git a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj index bdd7240f..330353f5 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj +++ b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj @@ -67,8 +67,6 @@ - -