| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 51 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %main "main" | |
| OpExecutionMode %main LocalSize 1 1 1 | |
| OpMemberName %i_block 0 "inner" | |
| OpName %i_block "i_block" | |
| OpName %main "main" | |
| OpName %tint_loop_idx "tint_loop_idx" | |
| OpName %tint_low_inc "tint_low_inc" | |
| OpName %tint_carry "tint_carry" | |
| OpMemberDecorate %i_block 0 Offset 0 | |
| OpDecorate %i_block Block | |
| OpDecorate %1 DescriptorSet 0 | |
| OpDecorate %1 Binding 0 | |
| OpDecorate %1 Coherent | |
| %uint = OpTypeInt 32 0 | |
| %i_block = OpTypeStruct %uint | |
| %_ptr_StorageBuffer_i_block = OpTypePointer StorageBuffer %i_block | |
| %1 = OpVariable %_ptr_StorageBuffer_i_block StorageBuffer | |
| %void = OpTypeVoid | |
| %7 = OpTypeFunction %void | |
| %v2uint = OpTypeVector %uint 2 | |
| %_ptr_Function_v2uint = OpTypePointer Function %v2uint | |
| %uint_4294967295 = OpConstant %uint 4294967295 | |
| %17 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 | |
| %21 = OpConstantNull %v2uint | |
| %bool = OpTypeBool | |
| %v2bool = OpTypeVector %bool 2 | |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint | |
| %uint_0 = OpConstant %uint 0 | |
| %uint_10 = OpConstant %uint 10 | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %uint_1 = OpConstant %uint 1 | |
| %main = OpFunction %void None %7 | |
| %8 = OpLabel | |
| %tint_loop_idx = OpVariable %_ptr_Function_v2uint Function | |
| OpBranch %9 | |
| %9 = OpLabel | |
| OpStore %tint_loop_idx %17 | |
| OpBranch %12 | |
| %12 = OpLabel | |
| OpLoopMerge %13 %11 None | |
| OpBranch %10 | |
| %10 = OpLabel | |
| %19 = OpLoad %v2uint %tint_loop_idx None | |
| %20 = OpIEqual %v2bool %19 %21 | |
| %24 = OpAll %bool %20 | |
| OpSelectionMerge %25 None | |
| OpBranchConditional %24 %26 %25 | |
| %26 = OpLabel | |
| OpBranch %13 | |
| %25 = OpLabel | |
| %27 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 | |
| %30 = OpLoad %uint %27 None | |
| %31 = OpULessThan %bool %30 %uint_10 | |
| OpSelectionMerge %33 None | |
| OpBranchConditional %31 %33 %34 | |
| %34 = OpLabel | |
| OpBranch %13 | |
| %33 = OpLabel | |
| OpBranch %11 | |
| %11 = OpLabel | |
| %35 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| %37 = OpLoad %uint %35 None | |
| %tint_low_inc = OpISub %uint %37 %uint_1 | |
| %40 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| OpStore %40 %tint_low_inc None | |
| %41 = OpIEqual %bool %tint_low_inc %uint_4294967295 | |
| %tint_carry = OpSelect %uint %41 %uint_1 %uint_0 | |
| %43 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| %44 = OpLoad %uint %43 None | |
| %45 = OpISub %uint %44 %tint_carry | |
| %46 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| OpStore %46 %45 None | |
| %47 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 | |
| %48 = OpLoad %uint %47 None | |
| %49 = OpIAdd %uint %48 %uint_1 | |
| %50 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 | |
| OpStore %50 %49 None | |
| OpBranch %12 | |
| %13 = OpLabel | |
| OpReturn | |
| OpFunctionEnd |