| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 38 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %foo "foo" | |
| OpExecutionMode %foo LocalSize 1 1 1 | |
| OpMemberName %tint_symbol_1 0 "tint_symbol" | |
| OpName %tint_symbol_1 "tint_symbol_1" | |
| OpName %foo "foo" | |
| OpName %i "i" | |
| OpName %x "x" | |
| OpName %x_0 "x" | |
| OpDecorate %_arr_int_uint_10 ArrayStride 4 | |
| OpMemberDecorate %tint_symbol_1 0 Offset 0 | |
| OpDecorate %tint_symbol_1 Block | |
| OpDecorate %1 DescriptorSet 0 | |
| OpDecorate %1 Binding 0 | |
| OpDecorate %1 Coherent | |
| %int = OpTypeInt 32 1 | |
| %uint = OpTypeInt 32 0 | |
| %uint_10 = OpConstant %uint 10 | |
| %_arr_int_uint_10 = OpTypeArray %int %uint_10 | |
| %tint_symbol_1 = OpTypeStruct %_arr_int_uint_10 | |
| %_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1 | |
| %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer | |
| %void = OpTypeVoid | |
| %10 = OpTypeFunction %void | |
| %_ptr_Function_int = OpTypePointer Function %int | |
| %int_0 = OpConstant %int 0 | |
| %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int | |
| %uint_0 = OpConstant %uint 0 | |
| %int_10 = OpConstant %int 10 | |
| %bool = OpTypeBool | |
| %foo = OpFunction %void None %10 | |
| %11 = OpLabel | |
| %i = OpVariable %_ptr_Function_int Function | |
| %x = OpVariable %_ptr_Function_int Function | |
| %x_0 = OpVariable %_ptr_Function_int Function | |
| OpStore %i %int_0 | |
| OpBranch %17 | |
| %17 = OpLabel | |
| OpLoopMerge %18 %16 None | |
| OpBranch %15 | |
| %15 = OpLabel | |
| %19 = OpLoad %int %i None | |
| %20 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %19 | |
| %23 = OpLoad %int %20 None | |
| OpStore %x %23 | |
| OpBranch %16 | |
| %16 = OpLabel | |
| %25 = OpLoad %int %x None | |
| %26 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %25 | |
| %27 = OpLoad %int %26 None | |
| OpStore %x_0 %27 | |
| %29 = OpLoad %int %x_0 None | |
| %30 = OpLoad %int %i None | |
| %31 = OpIAdd %int %30 %29 | |
| OpStore %i %31 None | |
| %32 = OpLoad %int %i None | |
| %33 = OpSGreaterThan %bool %32 %int_10 | |
| OpBranchConditional %33 %18 %17 | |
| %18 = OpLabel | |
| %36 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %int_0 | |
| %37 = OpLoad %int %i None | |
| OpStore %36 %37 None | |
| OpReturn | |
| OpFunctionEnd |