tint: Resolve @builtin() args as expressions

This CL makes the builtin argument resolve as a shadowable enumerator
expression.

Bug: tint:1841
Bug: tint:1845
Change-Id: I2aaa2c63025752f25c113cf2fb38f4d91c2c16c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120680
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton
2023-02-21 17:33:54 +00:00
committed by Dawn LUCI CQ
parent 21571709a2
commit 4d3ff9711e
448 changed files with 2044 additions and 1536 deletions

View File

@@ -17,7 +17,7 @@
OpName %lhs_0 "lhs"
OpName %rhs_0 "rhs"
OpName %compute_main_inner "compute_main_inner"
OpName %local_invocation_index "local_invocation_index"
OpName %local_invocation_index_2 "local_invocation_index_2"
OpName %idx "idx"
OpName %compute_main_1 "compute_main_1"
OpName %compute_main_inner_1 "compute_main_inner_1"
@@ -75,11 +75,11 @@
OpReturnValue %30
OpFunctionEnd
%compute_main_inner = OpFunction %void None %31
%local_invocation_index = OpFunctionParameter %uint
%local_invocation_index_2 = OpFunctionParameter %uint
%35 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %6
OpStore %idx %6
OpStore %idx %local_invocation_index
OpStore %idx %local_invocation_index_2
OpBranch %38
%38 = OpLabel
OpLoopMerge %39 %40 None