| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 45 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input |
| OpExecutionMode %compute_main LocalSize 1 1 1 |
| OpName %local_invocation_index_1 "local_invocation_index_1" |
| OpName %arg_0 "arg_0" |
| OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" |
| OpName %atomicMax_beccfc "atomicMax_beccfc" |
| OpName %res "res" |
| OpName %x_10 "x_10" |
| OpName %compute_main_inner "compute_main_inner" |
| OpName %local_invocation_index_2 "local_invocation_index_2" |
| OpName %compute_main_1 "compute_main_1" |
| OpName %x_30 "x_30" |
| OpName %compute_main_inner_0 "compute_main_inner" |
| OpName %local_invocation_index_1_param "local_invocation_index_1_param" |
| OpName %compute_main "compute_main" |
| OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %uint = OpTypeInt 32 0 |
| %_ptr_Private_uint = OpTypePointer Private %uint |
| %4 = OpConstantNull %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Private_uint Private %4 |
| %_ptr_Workgroup_uint = OpTypePointer Workgroup %uint |
| %arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %void = OpTypeVoid |
| %11 = OpTypeFunction %void |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_2 = OpConstant %uint 2 |
| %uint_1 = OpConstant %uint 1 |
| %21 = OpTypeFunction %void %uint |
| %uint_264 = OpConstant %uint 264 |
| %bool = OpTypeBool |
| %atomicMax_beccfc = OpFunction %void None %11 |
| %12 = OpLabel |
| %res = OpVariable %_ptr_Function_uint Function |
| OpStore %res %uint_0 |
| %x_10 = OpAtomicUMax %uint %arg_0 %uint_2 %uint_0 %uint_1 |
| OpStore %res %x_10 None |
| OpReturn |
| OpFunctionEnd |
| %compute_main_inner = OpFunction %void None %21 |
| %local_invocation_index_2 = OpFunctionParameter %uint |
| %22 = OpLabel |
| OpAtomicStore %arg_0 %uint_2 %uint_0 %uint_0 |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %26 = OpFunctionCall %void %atomicMax_beccfc |
| OpReturn |
| OpFunctionEnd |
| %compute_main_1 = OpFunction %void None %11 |
| %28 = OpLabel |
| %x_30 = OpLoad %uint %local_invocation_index_1 None |
| %30 = OpFunctionCall %void %compute_main_inner %x_30 |
| OpReturn |
| OpFunctionEnd |
| %compute_main_inner_0 = OpFunction %void None %21 |
| %local_invocation_index_1_param = OpFunctionParameter %uint |
| %33 = OpLabel |
| %34 = OpULessThan %bool %local_invocation_index_1_param %uint_1 |
| OpSelectionMerge %36 None |
| OpBranchConditional %34 %37 %36 |
| %37 = OpLabel |
| OpAtomicStore %arg_0 %uint_2 %uint_0 %uint_0 |
| OpBranch %36 |
| %36 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| OpStore %local_invocation_index_1 %local_invocation_index_1_param None |
| %40 = OpFunctionCall %void %compute_main_1 |
| OpReturn |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %11 |
| %42 = OpLabel |
| %43 = OpLoad %uint %compute_main_local_invocation_index_Input None |
| %44 = OpFunctionCall %void %compute_main_inner_0 %43 |
| OpReturn |
| OpFunctionEnd |