| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 37 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input |
| OpExecutionMode %compute_main LocalSize 1 1 1 |
| OpMemberName %S 0 "x" |
| OpMemberName %S 1 "a" |
| OpMemberName %S 2 "y" |
| OpName %S "S" |
| OpName %wg "wg" |
| OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" |
| OpName %compute_main_inner "compute_main_inner" |
| OpName %tint_local_index "tint_local_index" |
| OpName %wg "p0" |
| OpName %p1 "p1" |
| OpName %compute_main "compute_main" |
| OpMemberDecorate %S 0 Offset 0 |
| OpMemberDecorate %S 1 Offset 4 |
| OpMemberDecorate %S 2 Offset 8 |
| OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %int = OpTypeInt 32 1 |
| %uint = OpTypeInt 32 0 |
| %S = OpTypeStruct %int %uint %uint |
| %_ptr_Workgroup_S = OpTypePointer Workgroup %S |
| %wg = OpVariable %_ptr_Workgroup_S Workgroup |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %void = OpTypeVoid |
| %11 = OpTypeFunction %void %uint |
| %uint_0 = OpConstant %uint 0 |
| %bool = OpTypeBool |
| %_ptr_Workgroup_int = OpTypePointer Workgroup %int |
| %int_0 = OpConstant %int 0 |
| %_ptr_Workgroup_uint = OpTypePointer Workgroup %uint |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %_ptr_Workgroup_uint_0 = OpTypePointer Workgroup %uint |
| %uint_264 = OpConstant %uint 264 |
| %33 = OpTypeFunction %void |
| %compute_main_inner = OpFunction %void None %11 |
| %tint_local_index = OpFunctionParameter %uint |
| %12 = OpLabel |
| %13 = OpIEqual %bool %tint_local_index %uint_0 |
| OpSelectionMerge %16 None |
| OpBranchConditional %13 %17 %16 |
| %17 = OpLabel |
| %18 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0 |
| OpStore %18 %int_0 None |
| %21 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1 |
| OpAtomicStore %21 %uint_2 %uint_0 %uint_0 |
| %26 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %uint_2 |
| OpStore %26 %uint_0 None |
| OpBranch %16 |
| %16 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %p1 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1 |
| OpAtomicStore %p1 %uint_2 %uint_0 %uint_1 |
| OpReturn |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %33 |
| %34 = OpLabel |
| %35 = OpLoad %uint %compute_main_local_invocation_index_Input None |
| %36 = OpFunctionCall %void %compute_main_inner %35 |
| OpReturn |
| OpFunctionEnd |