| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 0 | |
| ; Bound: 79 | |
| ; 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 %wg "wg" | |
| OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory" | |
| OpName %local_idx "local_idx" | |
| OpName %idx_1 "idx_1" | |
| OpName %compute_main_inner "compute_main_inner" | |
| OpName %local_invocation_index_2 "local_invocation_index_2" | |
| OpName %idx "idx" | |
| 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 | |
| OpDecorate %_arr_uint_uint_4 ArrayStride 4 | |
| %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 | |
| %uint_4 = OpConstant %uint 4 | |
| %_arr_uint_uint_4 = OpTypeArray %uint %uint_4 | |
| %_ptr_Workgroup__arr_uint_uint_4 = OpTypePointer Workgroup %_arr_uint_uint_4 | |
| %wg = OpVariable %_ptr_Workgroup__arr_uint_uint_4 Workgroup | |
| %void = OpTypeVoid | |
| %11 = OpTypeFunction %void %uint | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %bool = OpTypeBool | |
| %uint_2 = OpConstant %uint 2 | |
| %uint_0 = OpConstant %uint 0 | |
| %_ptr_Workgroup_uint = OpTypePointer Workgroup %uint | |
| %uint_1 = OpConstant %uint 1 | |
| %uint_264 = OpConstant %uint 264 | |
| %int = OpTypeInt 32 1 | |
| %int_1 = OpConstant %int 1 | |
| %65 = OpTypeFunction %void | |
| %tint_zero_workgroup_memory = OpFunction %void None %11 | |
| %local_idx = OpFunctionParameter %uint | |
| %15 = OpLabel | |
| %idx_1 = OpVariable %_ptr_Function_uint Function %6 | |
| OpStore %idx_1 %local_idx | |
| OpBranch %18 | |
| %18 = OpLabel | |
| OpLoopMerge %19 %20 None | |
| OpBranch %21 | |
| %21 = OpLabel | |
| %23 = OpLoad %uint %idx_1 | |
| %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_1 | |
| %34 = OpAccessChain %_ptr_Workgroup_uint %wg %28 | |
| OpAtomicStore %34 %uint_2 %uint_0 %6 | |
| OpBranch %20 | |
| %20 = OpLabel | |
| %35 = OpLoad %uint %idx_1 | |
| %37 = OpIAdd %uint %35 %uint_1 | |
| OpStore %idx_1 %37 | |
| OpBranch %18 | |
| %19 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| OpReturn | |
| OpFunctionEnd | |
| %compute_main_inner = OpFunction %void None %11 | |
| %local_invocation_index_2 = OpFunctionParameter %uint | |
| %42 = OpLabel | |
| %idx = OpVariable %_ptr_Function_uint Function %6 | |
| OpStore %idx %6 | |
| OpStore %idx %local_invocation_index_2 | |
| OpBranch %44 | |
| %44 = OpLabel | |
| OpLoopMerge %45 %46 None | |
| OpBranch %47 | |
| %47 = OpLabel | |
| %49 = OpLoad %uint %idx | |
| %50 = OpULessThan %bool %49 %uint_4 | |
| %48 = OpLogicalNot %bool %50 | |
| OpSelectionMerge %51 None | |
| OpBranchConditional %48 %52 %51 | |
| %52 = OpLabel | |
| OpBranch %45 | |
| %51 = OpLabel | |
| %53 = OpLoad %uint %idx | |
| %56 = OpAccessChain %_ptr_Workgroup_uint %wg %53 | |
| OpAtomicStore %56 %uint_2 %uint_0 %6 | |
| OpBranch %46 | |
| %46 = OpLabel | |
| %57 = OpLoad %uint %idx | |
| %58 = OpIAdd %uint %57 %uint_1 | |
| OpStore %idx %58 | |
| OpBranch %44 | |
| %45 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %64 = OpAccessChain %_ptr_Workgroup_uint %wg %int_1 | |
| OpAtomicStore %64 %uint_2 %uint_0 %uint_1 | |
| OpReturn | |
| OpFunctionEnd | |
| %compute_main_1 = OpFunction %void None %65 | |
| %67 = OpLabel | |
| %68 = OpLoad %uint %local_invocation_index_1 | |
| %69 = OpFunctionCall %void %compute_main_inner %68 | |
| OpReturn | |
| OpFunctionEnd | |
| %compute_main_inner_1 = OpFunction %void None %11 | |
| %local_invocation_index_1_param = OpFunctionParameter %uint | |
| %72 = OpLabel | |
| %73 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index_1_param | |
| OpStore %local_invocation_index_1 %local_invocation_index_1_param | |
| %74 = OpFunctionCall %void %compute_main_1 | |
| OpReturn | |
| OpFunctionEnd | |
| %compute_main = OpFunction %void None %65 | |
| %76 = OpLabel | |
| %78 = OpLoad %uint %local_invocation_index_1_param_1 | |
| %77 = OpFunctionCall %void %compute_main_inner_1 %78 | |
| OpReturn | |
| OpFunctionEnd |