| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 30 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %S "S" |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" |
| OpName %func "func" |
| OpName %main_inner "main_inner" |
| OpName %tint_local_index "tint_local_index" |
| OpName %main "main" |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %int = OpTypeInt 32 1 |
| %_ptr_Workgroup_int = OpTypePointer Workgroup %int |
| %S = OpVariable %_ptr_Workgroup_int Workgroup |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %void = OpTypeVoid |
| %9 = OpTypeFunction %void |
| %int_42 = OpConstant %int 42 |
| %14 = OpTypeFunction %void %uint |
| %uint_0 = OpConstant %uint 0 |
| %bool = OpTypeBool |
| %int_0 = OpConstant %int 0 |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %func = OpFunction %void None %9 |
| %10 = OpLabel |
| OpStore %S %int_42 None |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %14 |
| %tint_local_index = OpFunctionParameter %uint |
| %15 = OpLabel |
| %16 = OpIEqual %bool %tint_local_index %uint_0 |
| OpSelectionMerge %19 None |
| OpBranchConditional %16 %20 %19 |
| %20 = OpLabel |
| OpStore %S %int_0 None |
| OpBranch %19 |
| %19 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %25 = OpFunctionCall %void %func |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %9 |
| %27 = OpLabel |
| %28 = OpLoad %uint %main_local_invocation_index_Input None |
| %29 = OpFunctionCall %void %main_inner %28 |
| OpReturn |
| OpFunctionEnd |