transform/hlsl: Use Symbols().New() for empty entry point

And drop the leading understore, it's no longer needed.

Bug tint:712

Change-Id: Ic0ad304119ceb148984d2fa0a5e9e61f2c3a89fd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47637
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton 2021-04-13 23:46:17 +00:00 committed by Commit Bot service account
parent 4d349b5391
commit 5c34060a4e
2 changed files with 3 additions and 2 deletions

View File

@ -698,7 +698,8 @@ void Hlsl::AddEmptyEntryPoint(CloneContext& ctx) const {
}
}
ctx.dst->Func(
"_tint_unused_entry_point", {}, ctx.dst->ty.void_(), {},
ctx.dst->Symbols().New("tint_unused_entry_point"), {},
ctx.dst->ty.void_(), {},
{ctx.dst->create<ast::StageDecoration>(ast::PipelineStage::kVertex)});
}

View File

@ -284,7 +284,7 @@ TEST_F(HlslTest, AddEmptyEntryPoint) {
auto* expect = R"(
[[stage(vertex)]]
fn _tint_unused_entry_point() {
fn tint_unused_entry_point() {
}
)";