| ; 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 | |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint | |
| %uint_0 = OpConstant %uint 0 | |
| %uint_1 = OpConstant %uint 1 | |
| %28 = OpConstantNull %v2uint | |
| %bool = OpTypeBool | |
| %v2bool = OpTypeVector %bool 2 | |
| %uint_10 = OpConstant %uint 10 | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %main = OpFunction %void None %7 | |
| %8 = OpLabel | |
| %tint_loop_idx = OpVariable %_ptr_Function_v2uint Function | |
| OpBranch %9 | |
| %9 = OpLabel | |
| OpStore %tint_loop_idx %17 | |
| %19 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 | |
| %22 = OpLoad %uint %19 None | |
| %23 = OpIAdd %uint %22 %uint_1 | |
| %25 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 | |
| OpStore %25 %23 None | |
| OpBranch %12 | |
| %12 = OpLabel | |
| OpLoopMerge %13 %11 None | |
| OpBranch %10 | |
| %10 = OpLabel | |
| %26 = OpLoad %v2uint %tint_loop_idx None | |
| %27 = OpIEqual %v2bool %26 %28 | |
| %31 = OpAll %bool %27 | |
| OpSelectionMerge %32 None | |
| OpBranchConditional %31 %33 %32 | |
| %33 = OpLabel | |
| OpBranch %13 | |
| %32 = OpLabel | |
| %34 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 | |
| %35 = OpLoad %uint %34 None | |
| %36 = OpULessThan %bool %35 %uint_10 | |
| OpSelectionMerge %38 None | |
| OpBranchConditional %36 %38 %39 | |
| %39 = OpLabel | |
| OpBranch %13 | |
| %38 = OpLabel | |
| OpBranch %11 | |
| %11 = OpLabel | |
| %40 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| %42 = OpLoad %uint %40 None | |
| %tint_low_inc = OpISub %uint %42 %uint_1 | |
| %44 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| OpStore %44 %tint_low_inc None | |
| %45 = OpIEqual %bool %tint_low_inc %uint_4294967295 | |
| %tint_carry = OpSelect %uint %45 %uint_1 %uint_0 | |
| %47 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| %48 = OpLoad %uint %47 None | |
| %49 = OpISub %uint %48 %tint_carry | |
| %50 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| OpStore %50 %49 None | |
| OpBranch %12 | |
| %13 = OpLabel | |
| OpReturn | |
| OpFunctionEnd |