Extend explicit entry points support to D2D shaders

このコミットが含まれているのは:
Sergio Pedri committed 2024-09-21 19:17:41 +02:00
1 親 c1c93c05f3
コミット ecb90821df
4ファイル変更
+33 -28

検索条件に一致するファイルはありません

-16
ファイルの表示
@@ -24,22 +24,6 @@ internal abstract class ExecuteMethodRewriter(ShaderSourceRewriter shaderSourceR
return (TNode?)base.Visit(node);
}
/// <inheritdoc/>
public override SyntaxNode? VisitMethodDeclaration(MethodDeclarationSyntax node)
{
MethodDeclarationSyntax updatedNode = ((MethodDeclarationSyntax)base.VisitMethodDeclaration(node)!).WithModifiers(TokenList());
// The entry point might be an explicit interface method implementation. In that case,
// the transpiled method will have the rewritten interface name as a prefix for the
// method name, which we don't want (it's invalid HLSL). So in that case, remove it.
if (updatedNode.ExplicitInterfaceSpecifier is not null)
{
updatedNode = updatedNode.WithExplicitInterfaceSpecifier(null);
}
return updatedNode;
}
/// <inheritdoc/>
public override SyntaxNode? VisitParameterList(ParameterListSyntax node)
{