| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 51 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input | |
| OpExecutionMode %main LocalSize 1 1 1 | |
| OpName %v "v" | |
| OpMemberName %out_block 0 "inner" | |
| OpName %out_block "out_block" | |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" | |
| OpName %foo "foo" | |
| OpName %main_inner "main_inner" | |
| OpName %tint_local_index "tint_local_index" | |
| OpName %idx "idx" | |
| OpName %main "main" | |
| OpMemberDecorate %out_block 0 Offset 0 | |
| OpDecorate %out_block Block | |
| OpDecorate %6 DescriptorSet 0 | |
| OpDecorate %6 Binding 0 | |
| OpDecorate %6 Coherent | |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex | |
| %uint = OpTypeInt 32 0 | |
| %uint_16 = OpConstant %uint 16 | |
| %_arr_uint_uint_16 = OpTypeArray %uint %uint_16 | |
| %_ptr_Workgroup__arr_uint_uint_16 = OpTypePointer Workgroup %_arr_uint_uint_16 | |
| %v = OpVariable %_ptr_Workgroup__arr_uint_uint_16 Workgroup | |
| %out_block = OpTypeStruct %uint | |
| %_ptr_StorageBuffer_out_block = OpTypePointer StorageBuffer %out_block | |
| %6 = OpVariable %_ptr_StorageBuffer_out_block StorageBuffer | |
| %_ptr_Input_uint = OpTypePointer Input %uint | |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input | |
| %void = OpTypeVoid | |
| %13 = OpTypeFunction %void | |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint | |
| %uint_0 = OpConstant %uint 0 | |
| %uint_64 = OpConstant %uint 64 | |
| %21 = OpTypeFunction %void %uint | |
| %uint_2 = OpConstant %uint 2 | |
| %uint_264 = OpConstant %uint 264 | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %bool = OpTypeBool | |
| %uint_4 = OpConstant %uint 4 | |
| %_ptr_Workgroup_uint = OpTypePointer Workgroup %uint | |
| %uint_1 = OpConstant %uint 1 | |
| %foo = OpFunction %void None %13 | |
| %14 = OpLabel | |
| %15 = OpAccessChain %_ptr_StorageBuffer_uint %6 %uint_0 | |
| OpStore %15 %uint_64 None | |
| OpReturn | |
| OpFunctionEnd | |
| %main_inner = OpFunction %void None %21 | |
| %tint_local_index = OpFunctionParameter %uint | |
| %22 = OpLabel | |
| %idx = OpVariable %_ptr_Function_uint Function | |
| OpBranch %23 | |
| %23 = OpLabel | |
| OpStore %idx %tint_local_index | |
| OpBranch %26 | |
| %26 = OpLabel | |
| OpLoopMerge %27 %25 None | |
| OpBranch %24 | |
| %24 = OpLabel | |
| %34 = OpLoad %uint %idx None | |
| %35 = OpUGreaterThanEqual %bool %34 %uint_16 | |
| OpSelectionMerge %37 None | |
| OpBranchConditional %35 %38 %37 | |
| %38 = OpLabel | |
| OpBranch %27 | |
| %37 = OpLabel | |
| %39 = OpIMul %uint %34 %uint_4 | |
| %41 = OpUDiv %uint %39 %uint_4 | |
| %42 = OpAccessChain %_ptr_Workgroup_uint %v %41 | |
| OpStore %42 %uint_0 None | |
| OpBranch %25 | |
| %25 = OpLabel | |
| %44 = OpLoad %uint %idx None | |
| %45 = OpIAdd %uint %44 %uint_1 | |
| OpStore %idx %45 None | |
| OpBranch %26 | |
| %27 = OpLabel | |
| OpControlBarrier %uint_2 %uint_2 %uint_264 | |
| %31 = OpFunctionCall %void %foo | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %13 | |
| %48 = OpLabel | |
| %49 = OpLoad %uint %main_local_invocation_index_Input None | |
| %50 = OpFunctionCall %void %main_inner %49 | |
| OpReturn | |
| OpFunctionEnd |