blob: f0cbfb37fa7805e927f361aa01a88fc797dd00e5 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 66
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %x_GLF_color "x_GLF_color"
OpName %func_ "func_"
OpName %i "i"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%8 = OpTypeFunction %float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%14 = OpConstantNull %int
%int_0 = OpConstant %int 0
%int_10 = OpConstant %int 10
%bool = OpTypeBool
%int_5 = OpConstant %int 5
%int_1 = OpConstant %int 1
%int_8 = OpConstant %int 8
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%void = OpTypeVoid
%44 = OpTypeFunction %void
%false = OpConstantFalse %bool
%54 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%55 = OpTypeFunction %main_out
%func_ = OpFunction %float None %8
%10 = OpLabel
%i = OpVariable %_ptr_Function_int Function %14
OpStore %i %int_0
OpBranch %16
%16 = OpLabel
OpLoopMerge %17 %18 None
OpBranch %19
%19 = OpLabel
%20 = OpLoad %int %i
%22 = OpSLessThan %bool %20 %int_10
OpSelectionMerge %24 None
OpBranchConditional %22 %25 %26
%25 = OpLabel
OpBranch %24
%26 = OpLabel
OpBranch %17
%24 = OpLabel
%27 = OpLoad %int %i
%29 = OpSGreaterThan %bool %27 %int_5
OpSelectionMerge %30 None
OpBranchConditional %29 %31 %30
%31 = OpLabel
%32 = OpLoad %int %i
%34 = OpIAdd %int %32 %int_1
OpStore %i %34
OpBranch %30
%30 = OpLabel
%35 = OpLoad %int %i
%37 = OpSGreaterThan %bool %35 %int_8
OpSelectionMerge %38 None
OpBranchConditional %37 %39 %38
%39 = OpLabel
OpReturnValue %float_0
%38 = OpLabel
OpBranch %18
%18 = OpLabel
%41 = OpLoad %int %i
%42 = OpIAdd %int %41 %int_1
OpStore %i %42
OpBranch %16
%17 = OpLabel
OpReturnValue %float_1
OpFunctionEnd
%main_1 = OpFunction %void None %44
%47 = OpLabel
OpSelectionMerge %49 None
OpBranchConditional %false %50 %51
%50 = OpLabel
%52 = OpFunctionCall %float %func_
%53 = OpCompositeConstruct %v4float %52 %52 %52 %52
OpStore %x_GLF_color %53
OpBranch %49
%51 = OpLabel
OpStore %x_GLF_color %54
OpBranch %49
%49 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %55
%58 = OpLabel
%59 = OpFunctionCall %void %main_1
%60 = OpLoad %v4float %x_GLF_color
%61 = OpCompositeConstruct %main_out %60
OpReturnValue %61
OpFunctionEnd
%main = OpFunction %void None %44
%63 = OpLabel
%64 = OpFunctionCall %main_out %main_inner
%65 = OpCompositeExtract %v4float %64 0
OpStore %x_GLF_color_1_1 %65
OpReturn
OpFunctionEnd