| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 0 | |
| ; Bound: 42 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %main "main" | |
| OpExecutionMode %main LocalSize 1 1 1 | |
| OpName %Buf "Buf" | |
| OpMemberName %Buf 0 "count" | |
| OpMemberName %Buf 1 "data" | |
| OpName %b "b" | |
| OpName %main "main" | |
| OpName %i "i" | |
| OpDecorate %Buf Block | |
| OpMemberDecorate %Buf 0 Offset 0 | |
| OpMemberDecorate %Buf 1 Offset 4 | |
| OpDecorate %_arr_uint_uint_50 ArrayStride 4 | |
| OpDecorate %b DescriptorSet 0 | |
| OpDecorate %b Binding 0 | |
| %uint = OpTypeInt 32 0 | |
| %uint_50 = OpConstant %uint 50 | |
| %_arr_uint_uint_50 = OpTypeArray %uint %uint_50 | |
| %Buf = OpTypeStruct %uint %_arr_uint_uint_50 | |
| %_ptr_StorageBuffer_Buf = OpTypePointer StorageBuffer %Buf | |
| %b = OpVariable %_ptr_StorageBuffer_Buf StorageBuffer | |
| %void = OpTypeVoid | |
| %7 = OpTypeFunction %void | |
| %uint_0 = OpConstant %uint 0 | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %14 = OpConstantNull %uint | |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint | |
| %bool = OpTypeBool | |
| %uint_2 = OpConstant %uint 2 | |
| %uint_1 = OpConstant %uint 1 | |
| %main = OpFunction %void None %7 | |
| %10 = OpLabel | |
| %i = OpVariable %_ptr_Function_uint Function %14 | |
| OpStore %i %uint_0 | |
| OpBranch %15 | |
| %15 = OpLabel | |
| OpLoopMerge %16 %17 None | |
| OpBranch %18 | |
| %18 = OpLabel | |
| %19 = OpLoad %uint %i | |
| %21 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_0 | |
| %22 = OpLoad %uint %21 | |
| %23 = OpUGreaterThanEqual %bool %19 %22 | |
| OpSelectionMerge %25 None | |
| OpBranchConditional %23 %26 %25 | |
| %26 = OpLabel | |
| OpBranch %16 | |
| %25 = OpLabel | |
| %27 = OpLoad %uint %i | |
| %28 = OpLoad %uint %i | |
| %30 = OpUMod %uint %28 %uint_2 | |
| %31 = OpIEqual %bool %30 %uint_0 | |
| OpSelectionMerge %32 None | |
| OpBranchConditional %31 %33 %32 | |
| %33 = OpLabel | |
| OpBranch %17 | |
| %32 = OpLabel | |
| %35 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_1 %27 | |
| OpStore %35 %uint_0 | |
| OpBranch %17 | |
| %17 = OpLabel | |
| %36 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_1 %27 | |
| %37 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_1 %27 | |
| %38 = OpLoad %uint %37 | |
| %39 = OpIMul %uint %38 %uint_2 | |
| OpStore %36 %39 | |
| %40 = OpLoad %uint %i | |
| %41 = OpIAdd %uint %40 %uint_1 | |
| OpStore %i %41 | |
| OpBranch %15 | |
| %16 = OpLabel | |
| OpReturn | |
| OpFunctionEnd |