| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 43 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input | |
| OpExecutionMode %main LocalSize 13 1 1 | |
| OpName %zero "zero" | |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" | |
| OpName %main_inner "main_inner" | |
| OpName %tint_local_index "tint_local_index" | |
| OpName %v "v" | |
| OpName %idx "idx" | |
| OpName %main "main" | |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex | |
| %int = OpTypeInt 32 1 | |
| %uint = OpTypeInt 32 0 | |
| %uint_23 = OpConstant %uint 23 | |
| %_arr_int_uint_23 = OpTypeArray %int %uint_23 | |
| %_ptr_Workgroup__arr_int_uint_23 = OpTypePointer Workgroup %_arr_int_uint_23 | |
| %zero = OpVariable %_ptr_Workgroup__arr_int_uint_23 Workgroup | |
| %_ptr_Input_uint = OpTypePointer Input %uint | |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input | |
| %void = OpTypeVoid | |
| %12 = OpTypeFunction %void %uint | |
| %uint_2 = OpConstant %uint 2 | |
| %uint_264 = OpConstant %uint 264 | |
| %_ptr_Function__arr_int_uint_23 = OpTypePointer Function %_arr_int_uint_23 | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %bool = OpTypeBool | |
| %_ptr_Workgroup_int = OpTypePointer Workgroup %int | |
| %int_0 = OpConstant %int 0 | |
| %uint_13 = OpConstant %uint 13 | |
| %39 = OpTypeFunction %void | |
| %main_inner = OpFunction %void None %12 | |
| %tint_local_index = OpFunctionParameter %uint | |
| %13 = OpLabel | |
| %v = OpVariable %_ptr_Function__arr_int_uint_23 Function | |
| %idx = OpVariable %_ptr_Function_uint Function | |
| OpBranch %14 | |
| %14 = OpLabel | |
| OpStore %idx %tint_local_index | |
| OpBranch %17 | |
| %17 = OpLabel | |
| OpLoopMerge %18 %16 None | |
| OpBranch %15 | |
| %15 = OpLabel | |
| %27 = OpLoad %uint %idx None | |
| %28 = OpUGreaterThanEqual %bool %27 %uint_23 | |
| OpSelectionMerge %30 None | |
| OpBranchConditional %28 %31 %30 | |
| %31 = OpLabel | |
| OpBranch %18 | |
| %30 = OpLabel | |
| %32 = OpAccessChain %_ptr_Workgroup_int %zero %27 | |
| OpStore %32 %int_0 None | |
| OpBranch %16 | |
| %16 = OpLabel | |
| %35 = OpLoad %uint %idx None | |
| %36 = OpIAdd %uint %35 %uint_13 | |
| OpStore %idx %36 None | |
| OpBranch %17 | |
| %18 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %22 = OpLoad %_arr_int_uint_23 %zero None | |
| OpStore %v %22 | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %39 | |
| %40 = OpLabel | |
| %41 = OpLoad %uint %main_local_invocation_index_Input None | |
| %42 = OpFunctionCall %void %main_inner %41 | |
| OpReturn | |
| OpFunctionEnd |