| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 35 |
| ; 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 %p "p" |
| OpName %w "w" |
| OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory" |
| OpName %local_idx "local_idx" |
| OpName %main_inner "main_inner" |
| OpName %local_invocation_index "local_invocation_index" |
| OpName %main "main" |
| OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Input_uint Input |
| %float = OpTypeFloat 32 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %7 = OpConstantNull %float |
| %p = OpVariable %_ptr_Private_float Private %7 |
| %_ptr_Workgroup_float = OpTypePointer Workgroup %float |
| %w = OpVariable %_ptr_Workgroup_float Workgroup |
| %void = OpTypeVoid |
| %10 = OpTypeFunction %void %uint |
| %uint_1 = OpConstant %uint 1 |
| %bool = OpTypeBool |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %30 = OpTypeFunction %void |
| %tint_zero_workgroup_memory = OpFunction %void None %10 |
| %local_idx = OpFunctionParameter %uint |
| %14 = OpLabel |
| %16 = OpULessThan %bool %local_idx %uint_1 |
| OpSelectionMerge %18 None |
| OpBranchConditional %16 %19 %18 |
| %19 = OpLabel |
| OpStore %w %7 |
| OpBranch %18 |
| %18 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %10 |
| %local_invocation_index = OpFunctionParameter %uint |
| %25 = OpLabel |
| %26 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index |
| %27 = OpLoad %float %p |
| %28 = OpLoad %float %w |
| %29 = OpFAdd %float %27 %28 |
| OpStore %p %29 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %30 |
| %32 = OpLabel |
| %34 = OpLoad %uint %local_invocation_index_1 |
| %33 = OpFunctionCall %void %main_inner %34 |
| OpReturn |
| OpFunctionEnd |