blob: 96a060dca14206b9f8f0dcaaec36d6b5e2ecf58b [file] [log] [blame]
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 310
OpName %main "main"
OpName %func_i1_ "func(i1;"
OpName %x "x"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %_ ""
OpName %_GLF_color "_GLF_color"
OpName %i "i"
OpName %param "param"
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%11 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%14 = OpTypeFunction %void %_ptr_Function_int
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_8 = OpConstant %int 8
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%25 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%26 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%int_10 = OpConstant %int 10
%int_1 = OpConstant %int 1
%main = OpFunction %void None %11
%29 = OpLabel
%i = OpVariable %_ptr_Function_int Function
%param = OpVariable %_ptr_Function_int Function
OpStore %_GLF_color %26
OpStore %i %int_0
OpBranch %30
%30 = OpLabel
%31 = OpPhi %int %int_0 %29 %32 %33
%34 = OpAccessChain %_ptr_Uniform_int %_ %int_0
%35 = OpLoad %int %34
%36 = OpIAdd %int %int_10 %35
%37 = OpSLessThan %bool %31 %36
OpLoopMerge %38 %33 None
OpBranchConditional %37 %33 %38
%33 = OpLabel
OpStore %param %31
%39 = OpFunctionCall %void %func_i1_ %param
%32 = OpIAdd %int %31 %int_1
OpStore %i %32
OpBranch %30
%38 = OpLabel
OpReturn
OpFunctionEnd
%func_i1_ = OpFunction %void None %14
%x = OpFunctionParameter %_ptr_Function_int
%40 = OpLabel
%41 = OpLoad %int %x
%42 = OpAccessChain %_ptr_Uniform_int %_ %int_0
%43 = OpLoad %int %42
%44 = OpSLessThan %bool %41 %43
OpSelectionMerge %45 None
OpBranchConditional %44 %46 %45
%46 = OpLabel
OpKill
%45 = OpLabel
%47 = OpLoad %int %x
%48 = OpSGreaterThan %bool %47 %int_8
OpSelectionMerge %49 None
OpBranchConditional %48 %50 %51
%50 = OpLabel
OpStore %_GLF_color %25
OpBranch %49
%51 = OpLabel
OpStore %_GLF_color %26
OpBranch %49
%49 = OpLabel
OpReturn
OpFunctionEnd