| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 66 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %compute_main "compute_main" %local_invocation_index_1_param_1 |
| OpExecutionMode %compute_main LocalSize 1 1 1 |
| OpName %local_invocation_index_1_param_1 "local_invocation_index_1_param_1" |
| OpName %local_invocation_index_1 "local_invocation_index_1" |
| OpName %S_atomic "S_atomic" |
| OpMemberName %S_atomic 0 "x" |
| OpMemberName %S_atomic 1 "a" |
| OpMemberName %S_atomic 2 "b" |
| OpName %wg "wg" |
| OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory" |
| OpName %local_idx "local_idx" |
| OpName %compute_main_inner "compute_main_inner" |
| OpName %local_invocation_index_2 "local_invocation_index_2" |
| OpName %compute_main_1 "compute_main_1" |
| OpName %compute_main_inner_1 "compute_main_inner_1" |
| OpName %local_invocation_index_1_param "local_invocation_index_1_param" |
| OpName %compute_main "compute_main" |
| OpDecorate %local_invocation_index_1_param_1 BuiltIn LocalInvocationIndex |
| OpMemberDecorate %S_atomic 0 Offset 0 |
| OpMemberDecorate %S_atomic 1 Offset 4 |
| OpMemberDecorate %S_atomic 2 Offset 8 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %local_invocation_index_1_param_1 = OpVariable %_ptr_Input_uint Input |
| %_ptr_Private_uint = OpTypePointer Private %uint |
| %6 = OpConstantNull %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Private_uint Private %6 |
| %int = OpTypeInt 32 1 |
| %S_atomic = OpTypeStruct %int %uint %uint |
| %_ptr_Workgroup_S_atomic = OpTypePointer Workgroup %S_atomic |
| %wg = OpVariable %_ptr_Workgroup_S_atomic Workgroup |
| %void = OpTypeVoid |
| %11 = OpTypeFunction %void %uint |
| %uint_1 = OpConstant %uint 1 |
| %bool = OpTypeBool |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Workgroup_int = OpTypePointer Workgroup %int |
| %24 = OpConstantNull %int |
| %uint_2 = OpConstant %uint 2 |
| %_ptr_Workgroup_uint = OpTypePointer Workgroup %uint |
| %uint_264 = OpConstant %uint 264 |
| %52 = OpTypeFunction %void |
| %tint_zero_workgroup_memory = OpFunction %void None %11 |
| %local_idx = OpFunctionParameter %uint |
| %15 = OpLabel |
| %17 = OpULessThan %bool %local_idx %uint_1 |
| OpSelectionMerge %19 None |
| OpBranchConditional %17 %20 %19 |
| %20 = OpLabel |
| %23 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0 |
| OpStore %23 %24 |
| %29 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1 |
| OpAtomicStore %29 %uint_2 %uint_0 %6 |
| %32 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_2 |
| OpAtomicStore %32 %uint_2 %uint_0 %6 |
| OpBranch %19 |
| %19 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| OpReturn |
| OpFunctionEnd |
| %compute_main_inner = OpFunction %void None %11 |
| %local_invocation_index_2 = OpFunctionParameter %uint |
| %37 = OpLabel |
| %38 = OpAccessChain %_ptr_Workgroup_int %wg %uint_0 |
| OpStore %38 %24 |
| %41 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1 |
| OpAtomicStore %41 %uint_2 %uint_0 %6 |
| %44 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_2 |
| OpAtomicStore %44 %uint_2 %uint_0 %6 |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %48 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_1 |
| OpAtomicStore %48 %uint_2 %uint_0 %uint_1 |
| %51 = OpAccessChain %_ptr_Workgroup_uint %wg %uint_2 |
| OpAtomicStore %51 %uint_2 %uint_0 %uint_2 |
| OpReturn |
| OpFunctionEnd |
| %compute_main_1 = OpFunction %void None %52 |
| %54 = OpLabel |
| %55 = OpLoad %uint %local_invocation_index_1 |
| %56 = OpFunctionCall %void %compute_main_inner %55 |
| OpReturn |
| OpFunctionEnd |
| %compute_main_inner_1 = OpFunction %void None %11 |
| %local_invocation_index_1_param = OpFunctionParameter %uint |
| %59 = OpLabel |
| %60 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index_1_param |
| OpStore %local_invocation_index_1 %local_invocation_index_1_param |
| %61 = OpFunctionCall %void %compute_main_1 |
| OpReturn |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %52 |
| %63 = OpLabel |
| %65 = OpLoad %uint %local_invocation_index_1_param_1 |
| %64 = OpFunctionCall %void %compute_main_inner_1 %65 |
| OpReturn |
| OpFunctionEnd |