Remove support for the old _idx builtins.

This CL removes the old _idx variants of builtins in favour of the
_index versions.

Change-Id: I1678b5fae63c9d4f7f63feabf7410a58505d397a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38825
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2021-01-26 20:21:31 +00:00 committed by Commit Bot service account
parent 67beed1b94
commit c2972cfa60
2 changed files with 3 additions and 7 deletions

View File

@ -103,10 +103,10 @@ ast::Builtin ident_to_builtin(const std::string& str) {
if (str == "position") { if (str == "position") {
return ast::Builtin::kPosition; return ast::Builtin::kPosition;
} }
if (str == "vertex_idx" || str == "vertex_index") { if (str == "vertex_index") {
return ast::Builtin::kVertexIndex; return ast::Builtin::kVertexIndex;
} }
if (str == "instance_idx" || str == "instance_index") { if (str == "instance_index") {
return ast::Builtin::kInstanceIndex; return ast::Builtin::kInstanceIndex;
} }
if (str == "front_facing") { if (str == "front_facing") {
@ -121,7 +121,7 @@ ast::Builtin ident_to_builtin(const std::string& str) {
if (str == "local_invocation_id") { if (str == "local_invocation_id") {
return ast::Builtin::kLocalInvocationId; return ast::Builtin::kLocalInvocationId;
} }
if (str == "local_invocation_idx" || str == "local_invocation_index") { if (str == "local_invocation_index") {
return ast::Builtin::kLocalInvocationIndex; return ast::Builtin::kLocalInvocationIndex;
} }
if (str == "global_invocation_id") { if (str == "global_invocation_id") {

View File

@ -113,17 +113,13 @@ INSTANTIATE_TEST_SUITE_P(
ParserImplTest, ParserImplTest,
BuiltinTest, BuiltinTest,
testing::Values(BuiltinData{"position", ast::Builtin::kPosition}, testing::Values(BuiltinData{"position", ast::Builtin::kPosition},
BuiltinData{"vertex_idx", ast::Builtin::kVertexIndex},
BuiltinData{"vertex_index", ast::Builtin::kVertexIndex}, BuiltinData{"vertex_index", ast::Builtin::kVertexIndex},
BuiltinData{"instance_idx", ast::Builtin::kInstanceIndex},
BuiltinData{"instance_index", ast::Builtin::kInstanceIndex}, BuiltinData{"instance_index", ast::Builtin::kInstanceIndex},
BuiltinData{"front_facing", ast::Builtin::kFrontFacing}, BuiltinData{"front_facing", ast::Builtin::kFrontFacing},
BuiltinData{"frag_coord", ast::Builtin::kFragCoord}, BuiltinData{"frag_coord", ast::Builtin::kFragCoord},
BuiltinData{"frag_depth", ast::Builtin::kFragDepth}, BuiltinData{"frag_depth", ast::Builtin::kFragDepth},
BuiltinData{"local_invocation_id", BuiltinData{"local_invocation_id",
ast::Builtin::kLocalInvocationId}, ast::Builtin::kLocalInvocationId},
BuiltinData{"local_invocation_idx",
ast::Builtin::kLocalInvocationIndex},
BuiltinData{"local_invocation_index", BuiltinData{"local_invocation_index",
ast::Builtin::kLocalInvocationIndex}, ast::Builtin::kLocalInvocationIndex},
BuiltinData{"global_invocation_id", BuiltinData{"global_invocation_id",