| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 44 |
| ; 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_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %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 |
| %29 = OpLoad %uint %i |
| %30 = OpAccessChain %_ptr_StorageBuffer_uint %b %uint_1 %29 |
| %31 = OpLoad %uint %i |
| %33 = OpUMod %uint %31 %uint_2 |
| %34 = OpIEqual %bool %33 %uint_0 |
| OpSelectionMerge %35 None |
| OpBranchConditional %34 %36 %35 |
| %36 = OpLabel |
| OpBranch %17 |
| %35 = OpLabel |
| OpStore %30 %uint_0 |
| OpBranch %17 |
| %17 = OpLabel |
| %40 = OpLoad %uint %30 |
| %41 = OpIMul %uint %40 %uint_2 |
| OpStore %30 %41 |
| %42 = OpLoad %uint %i |
| %43 = OpIAdd %uint %42 %uint_1 |
| OpStore %i %43 |
| OpBranch %15 |
| %16 = OpLabel |
| OpReturn |
| OpFunctionEnd |