From be4743cd967a2220effd159cb7f1237426bd233e Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 30 Nov 2020 01:04:53 +0100 Subject: [PATCH] Changed entry point name to Execute --- src/ComputeSharp.Shaders/Translation/ShaderCompiler.cs | 2 +- .../SyntaxRewriters/ExecuteMethodRewriter.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ComputeSharp.Shaders/Translation/ShaderCompiler.cs b/src/ComputeSharp.Shaders/Translation/ShaderCompiler.cs index 2253debe..28fb166d 100644 --- a/src/ComputeSharp.Shaders/Translation/ShaderCompiler.cs +++ b/src/ComputeSharp.Shaders/Translation/ShaderCompiler.cs @@ -75,7 +75,7 @@ namespace ComputeSharp.Shaders.Translation // Try to compile the new compute shader fixed (char* shaderName = "") - fixed (char* entryPoint = "CSMain") + fixed (char* entryPoint = nameof(IComputeShader.Execute)) fixed (char* shaderProfile = "cs_6_1") fixed (char* optimization = "-O3") { diff --git a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ExecuteMethodRewriter.cs b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ExecuteMethodRewriter.cs index 07e0d06b..63245d3b 100644 --- a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ExecuteMethodRewriter.cs +++ b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ExecuteMethodRewriter.cs @@ -76,9 +76,7 @@ namespace ComputeSharp.SourceGenerators.SyntaxRewriters IdentifierName("z")), IdentifierName("__z"))); - return updatedNode - .WithIdentifier(Identifier("CSMain")) - .WithBody(Block(IfStatement(rangeCheckExpression, updatedNode.Body!))); + return updatedNode.WithBody(Block(IfStatement(rangeCheckExpression, updatedNode.Body!))); } } }