blob: d31c8e9f5b4d0c0d997d577058e0ce89b1bf221a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 45
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpMemberName %tint_symbol_1 0 "tint_symbol"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %f "f"
OpName %g "g"
OpName %j "j"
OpName %k "k"
OpName %main "main"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 NonWritable
%int = OpTypeInt 32 1
%tint_symbol_1 = OpTypeStruct %int
%_ptr_Uniform_tint_symbol_1 = OpTypePointer Uniform %tint_symbol_1
%1 = OpVariable %_ptr_Uniform_tint_symbol_1 Uniform
%6 = OpTypeFunction %int
%int_0 = OpConstant %int 0
%void = OpTypeVoid
%11 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%_ptr_Uniform_int = OpTypePointer Uniform %int
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%f = OpFunction %int None %6
%7 = OpLabel
OpReturnValue %int_0
OpFunctionEnd
%g = OpFunction %void None %11
%12 = OpLabel
%j = OpVariable %_ptr_Function_int Function
%k = OpVariable %_ptr_Function_int Function
OpStore %j %int_0
OpBranch %17
%17 = OpLabel
OpLoopMerge %18 %16 None
OpBranch %15
%15 = OpLabel
%19 = OpLoad %int %j None
%20 = OpSGreaterThanEqual %bool %19 %int_1
OpSelectionMerge %23 None
OpBranchConditional %20 %24 %23
%24 = OpLabel
OpBranch %18
%23 = OpLabel
%25 = OpLoad %int %j None
%26 = OpIAdd %int %25 %int_1
OpStore %j %26 None
%27 = OpFunctionCall %int %f
OpStore %k %27
OpBranch %16
%16 = OpLabel
OpBranch %17
%18 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
%30 = OpLabel
%31 = OpAccessChain %_ptr_Uniform_int %1 %uint_0
%35 = OpLoad %int %31 None
OpSelectionMerge %38 None
OpSwitch %35 %36 0 %37
%37 = OpLabel
%39 = OpAccessChain %_ptr_Uniform_int %1 %uint_0
%40 = OpLoad %int %39 None
OpSelectionMerge %43 None
OpSwitch %40 %41 0 %42
%42 = OpLabel
OpBranch %43
%41 = OpLabel
%44 = OpFunctionCall %void %g
OpBranch %43
%43 = OpLabel
OpBranch %38
%36 = OpLabel
OpBranch %38
%38 = OpLabel
OpReturn
OpFunctionEnd