| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 43 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint Fragment %main "main" | |
| OpExecutionMode %main OriginUpperLeft | |
| OpMemberName %tint_symbol_1 0 "tint_symbol" | |
| OpName %tint_symbol_1 "tint_symbol_1" | |
| OpName %foo "foo" | |
| OpName %i "i" | |
| OpName %main "main" | |
| OpDecorate %_arr_int_uint_4 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_4 = OpConstant %uint 4 | |
| %_arr_int_uint_4 = OpTypeArray %int %uint_4 | |
| %tint_symbol_1 = OpTypeStruct %_arr_int_uint_4 | |
| %_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 | |
| %int_4 = OpConstant %int 4 | |
| %bool = OpTypeBool | |
| %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int | |
| %uint_0 = OpConstant %uint 0 | |
| %int_2 = OpConstant %int 2 | |
| %int_1 = OpConstant %int 1 | |
| %foo = OpFunction %void None %10 | |
| %11 = OpLabel | |
| %i = OpVariable %_ptr_Function_int Function | |
| OpBranch %12 | |
| %12 = OpLabel | |
| OpStore %i %int_0 | |
| OpBranch %15 | |
| %15 = OpLabel | |
| OpLoopMerge %16 %14 None | |
| OpBranch %13 | |
| %13 = OpLabel | |
| %20 = OpLoad %int %i None | |
| %21 = OpSLessThan %bool %20 %int_4 | |
| OpSelectionMerge %24 None | |
| OpBranchConditional %21 %24 %25 | |
| %25 = OpLabel | |
| OpBranch %16 | |
| %24 = OpLabel | |
| %26 = OpLoad %int %i None | |
| %27 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %26 | |
| %30 = OpLoad %int %27 None | |
| OpSelectionMerge %33 None | |
| OpSwitch %30 %31 1 %32 | |
| %32 = OpLabel | |
| OpBranch %14 | |
| %31 = OpLabel | |
| %34 = OpLoad %int %i None | |
| %35 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %34 | |
| OpStore %35 %int_2 None | |
| OpBranch %33 | |
| %33 = OpLabel | |
| OpBranch %14 | |
| %14 = OpLabel | |
| %37 = OpLoad %int %i None | |
| %38 = OpIAdd %int %37 %int_1 | |
| OpStore %i %38 None | |
| OpBranch %15 | |
| %16 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %10 | |
| %41 = OpLabel | |
| %42 = OpFunctionCall %void %foo | |
| OpReturn | |
| OpFunctionEnd |