| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 57 |
| ; 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 "i" |
| OpName %S "S" |
| OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory" |
| OpName %local_idx "local_idx" |
| OpName %idx "idx" |
| OpName %func_S_X "func_S_X" |
| OpName %pointer "pointer" |
| 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_str_uint_4 ArrayStride 4 |
| OpDecorate %_arr_uint_uint_1 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 |
| %str = OpTypeStruct %int |
| %uint_4 = OpConstant %uint 4 |
| %_arr_str_uint_4 = OpTypeArray %str %uint_4 |
| %_ptr_Workgroup__arr_str_uint_4 = OpTypePointer Workgroup %_arr_str_uint_4 |
| %S = OpVariable %_ptr_Workgroup__arr_str_uint_4 Workgroup |
| %void = OpTypeVoid |
| %10 = OpTypeFunction %void %uint |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %17 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Workgroup_str = OpTypePointer Workgroup %str |
| %31 = OpConstantNull %str |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %_arr_uint_uint_1 = OpTypeArray %uint %uint_1 |
| %38 = OpTypeFunction %void %_arr_uint_uint_1 |
| %43 = OpConstantNull %int |
| %51 = OpConstantComposite %_arr_uint_uint_1 %uint_2 |
| %52 = OpTypeFunction %void |
| %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 |
| %30 = OpAccessChain %_ptr_Workgroup_str %S %28 |
| OpStore %30 %31 |
| OpBranch %20 |
| %20 = OpLabel |
| %32 = OpLoad %uint %idx |
| %34 = OpIAdd %uint %32 %uint_1 |
| OpStore %idx %34 |
| OpBranch %18 |
| %19 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| OpReturn |
| OpFunctionEnd |
| %func_S_X = OpFunction %void None %38 |
| %pointer = OpFunctionParameter %_arr_uint_uint_1 |
| %42 = OpLabel |
| %44 = OpCompositeExtract %uint %pointer 0 |
| %45 = OpAccessChain %_ptr_Workgroup_str %S %44 |
| OpStore %45 %31 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %10 |
| %local_invocation_index = OpFunctionParameter %uint |
| %48 = OpLabel |
| %49 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index |
| %50 = OpFunctionCall %void %func_S_X %51 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %52 |
| %54 = OpLabel |
| %56 = OpLoad %uint %local_invocation_index_1 |
| %55 = OpFunctionCall %void %main_inner %56 |
| OpReturn |
| OpFunctionEnd |