Revert "Remove support for the old _idx builtins."
This reverts commit c2972cfa60
.
Reason for revert: Looks like CTS in Chrome doesn't have this change yet.
Original change's description:
> 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>
TBR=dneto@google.com,dsinclair@chromium.org,bclayton@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I29b6016f2e9e0b6245e22e2e18ff2f8c9a17dc74
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39280
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
30c1f25a7a
commit
5ad2d0087b
|
@ -103,10 +103,10 @@ ast::Builtin ident_to_builtin(const std::string& str) {
|
|||
if (str == "position") {
|
||||
return ast::Builtin::kPosition;
|
||||
}
|
||||
if (str == "vertex_index") {
|
||||
if (str == "vertex_idx" || str == "vertex_index") {
|
||||
return ast::Builtin::kVertexIndex;
|
||||
}
|
||||
if (str == "instance_index") {
|
||||
if (str == "instance_idx" || str == "instance_index") {
|
||||
return ast::Builtin::kInstanceIndex;
|
||||
}
|
||||
if (str == "front_facing") {
|
||||
|
@ -121,7 +121,7 @@ ast::Builtin ident_to_builtin(const std::string& str) {
|
|||
if (str == "local_invocation_id") {
|
||||
return ast::Builtin::kLocalInvocationId;
|
||||
}
|
||||
if (str == "local_invocation_index") {
|
||||
if (str == "local_invocation_idx" || str == "local_invocation_index") {
|
||||
return ast::Builtin::kLocalInvocationIndex;
|
||||
}
|
||||
if (str == "global_invocation_id") {
|
||||
|
|
|
@ -113,13 +113,17 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
ParserImplTest,
|
||||
BuiltinTest,
|
||||
testing::Values(BuiltinData{"position", ast::Builtin::kPosition},
|
||||
BuiltinData{"vertex_idx", ast::Builtin::kVertexIndex},
|
||||
BuiltinData{"vertex_index", ast::Builtin::kVertexIndex},
|
||||
BuiltinData{"instance_idx", ast::Builtin::kInstanceIndex},
|
||||
BuiltinData{"instance_index", ast::Builtin::kInstanceIndex},
|
||||
BuiltinData{"front_facing", ast::Builtin::kFrontFacing},
|
||||
BuiltinData{"frag_coord", ast::Builtin::kFragCoord},
|
||||
BuiltinData{"frag_depth", ast::Builtin::kFragDepth},
|
||||
BuiltinData{"local_invocation_id",
|
||||
ast::Builtin::kLocalInvocationId},
|
||||
BuiltinData{"local_invocation_idx",
|
||||
ast::Builtin::kLocalInvocationIndex},
|
||||
BuiltinData{"local_invocation_index",
|
||||
ast::Builtin::kLocalInvocationIndex},
|
||||
BuiltinData{"global_invocation_id",
|
||||
|
|
Loading…
Reference in New Issue