writer/hlsl: Fix mapping for [[builtin(front_facing)]]

Change-Id: I9493b8599e306113d4ede7b109adf5d119fbe4d6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47821
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
This commit is contained in:
James Price 2021-04-14 22:15:58 +00:00 committed by Commit Bot service account
parent 0ba48eeb52
commit 172215e118
2 changed files with 2 additions and 2 deletions

View File

@ -1941,7 +1941,7 @@ std::string GeneratorImpl::builtin_to_attribute(ast::Builtin builtin) const {
case ast::Builtin::kInstanceIndex: case ast::Builtin::kInstanceIndex:
return "SV_InstanceID"; return "SV_InstanceID";
case ast::Builtin::kFrontFacing: case ast::Builtin::kFrontFacing:
return "SV_IsFrontFacing"; return "SV_IsFrontFace";
case ast::Builtin::kFragCoord: case ast::Builtin::kFragCoord:
return "SV_Position"; return "SV_Position";
case ast::Builtin::kFragDepth: case ast::Builtin::kFragDepth:

View File

@ -75,7 +75,7 @@ INSTANTIATE_TEST_SUITE_P(
HlslBuiltinData{ast::Builtin::kPosition, "SV_Position"}, HlslBuiltinData{ast::Builtin::kPosition, "SV_Position"},
HlslBuiltinData{ast::Builtin::kVertexIndex, "SV_VertexID"}, HlslBuiltinData{ast::Builtin::kVertexIndex, "SV_VertexID"},
HlslBuiltinData{ast::Builtin::kInstanceIndex, "SV_InstanceID"}, HlslBuiltinData{ast::Builtin::kInstanceIndex, "SV_InstanceID"},
HlslBuiltinData{ast::Builtin::kFrontFacing, "SV_IsFrontFacing"}, HlslBuiltinData{ast::Builtin::kFrontFacing, "SV_IsFrontFace"},
HlslBuiltinData{ast::Builtin::kFragCoord, "SV_Position"}, HlslBuiltinData{ast::Builtin::kFragCoord, "SV_Position"},
HlslBuiltinData{ast::Builtin::kFragDepth, "SV_Depth"}, HlslBuiltinData{ast::Builtin::kFragDepth, "SV_Depth"},
HlslBuiltinData{ast::Builtin::kLocalInvocationId, "SV_GroupThreadID"}, HlslBuiltinData{ast::Builtin::kLocalInvocationId, "SV_GroupThreadID"},