| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 54 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %local_invocation_index_1 |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %local_invocation_index_1 "local_invocation_index_1" |
| OpName %str "str" |
| OpMemberName %str 0 "arr" |
| OpName %S "S" |
| OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory" |
| OpName %local_idx "local_idx" |
| OpName %idx "idx" |
| OpName %func_S_arr "func_S_arr" |
| OpName %main_inner "main_inner" |
| OpName %local_invocation_index "local_invocation_index" |
| OpName %main "main" |
| OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex |
| OpMemberDecorate %str 0 Offset 0 |
| OpDecorate %_arr_int_uint_4 ArrayStride 4 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Input_uint Input |
| %int = OpTypeInt 32 1 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_int_uint_4 = OpTypeArray %int %uint_4 |
| %str = OpTypeStruct %_arr_int_uint_4 |
| %_ptr_Workgroup_str = OpTypePointer Workgroup %str |
| %S = OpVariable %_ptr_Workgroup_str Workgroup |
| %void = OpTypeVoid |
| %10 = OpTypeFunction %void %uint |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %17 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Workgroup_int = OpTypePointer Workgroup %int |
| %32 = OpConstantNull %int |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %39 = OpTypeFunction %void |
| %_ptr_Workgroup__arr_int_uint_4 = OpTypePointer Workgroup %_arr_int_uint_4 |
| %44 = OpConstantNull %_arr_int_uint_4 |
| %tint_zero_workgroup_memory = OpFunction %void None %10 |
| %local_idx = OpFunctionParameter %uint |
| %14 = OpLabel |
| %idx = OpVariable %_ptr_Function_uint Function %17 |
| OpStore %idx %local_idx |
| OpBranch %18 |
| %18 = OpLabel |
| OpLoopMerge %19 %20 None |
| OpBranch %21 |
| %21 = OpLabel |
| %23 = OpLoad %uint %idx |
| %24 = OpULessThan %bool %23 %uint_4 |
| %22 = OpLogicalNot %bool %24 |
| OpSelectionMerge %26 None |
| OpBranchConditional %22 %27 %26 |
| %27 = OpLabel |
| OpBranch %19 |
| %26 = OpLabel |
| %28 = OpLoad %uint %idx |
| %31 = OpAccessChain %_ptr_Workgroup_int %S %uint_0 %28 |
| OpStore %31 %32 |
| OpBranch %20 |
| %20 = OpLabel |
| %33 = OpLoad %uint %idx |
| %35 = OpIAdd %uint %33 %uint_1 |
| OpStore %idx %35 |
| OpBranch %18 |
| %19 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| OpReturn |
| OpFunctionEnd |
| %func_S_arr = OpFunction %void None %39 |
| %41 = OpLabel |
| %43 = OpAccessChain %_ptr_Workgroup__arr_int_uint_4 %S %uint_0 |
| OpStore %43 %44 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %10 |
| %local_invocation_index = OpFunctionParameter %uint |
| %47 = OpLabel |
| %48 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index |
| %49 = OpFunctionCall %void %func_S_arr |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %39 |
| %51 = OpLabel |
| %53 = OpLoad %uint %local_invocation_index_1 |
| %52 = OpFunctionCall %void %main_inner %53 |
| OpReturn |
| OpFunctionEnd |