blob: 4e21ac0111e580863d26f0fb8d11bf7f05386ff8 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 117
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_5 "x_5"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %x_36 "x_36"
OpName %x_37 "x_37"
OpName %x_7 "x_7"
OpName %x_38 "x_38"
OpName %color "color"
OpName %x_40 "x_40"
OpName %x_43 "x_43"
OpName %x_40_phi "x_40_phi"
OpName %x_42_phi "x_42_phi"
OpName %x_56_phi "x_56_phi"
OpName %x_58_phi "x_58_phi"
OpName %x_43_phi "x_43_phi"
OpName %x_62 "x_62"
OpName %x_62_phi "x_62_phi"
OpName %x_64_phi "x_64_phi"
OpName %x_65_phi "x_65_phi"
OpName %x_70_phi "x_70_phi"
OpName %x_71_phi "x_71_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_5 NonWritable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_5 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %9
%void = OpTypeVoid
%12 = OpTypeFunction %void
%bool = OpTypeBool
%false = OpConstantFalse %bool
%_ptr_Function_bool = OpTypePointer Function %bool
%20 = OpConstantNull %bool
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%25 = OpConstantNull %int
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%30 = OpConstantNull %v3float
%float_0 = OpConstant %float 0
%38 = OpConstantComposite %v3float %float_0 %float_0 %float_0
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1
%56 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%true = OpConstantTrue %bool
%_ptr_Function_float = OpTypePointer Function %float
%uint_2 = OpConstant %uint 2
%104 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%105 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_36 = OpVariable %_ptr_Function_bool Function %20
%x_37 = OpVariable %_ptr_Function_bool Function %20
%x_7 = OpVariable %_ptr_Function_int Function %25
%x_38 = OpVariable %_ptr_Function_bool Function %20
%color = OpVariable %_ptr_Function_v3float Function %30
%x_40 = OpVariable %_ptr_Function_bool Function %20
%x_43 = OpVariable %_ptr_Function_v3float Function %30
%x_40_phi = OpVariable %_ptr_Function_bool Function %20
%x_42_phi = OpVariable %_ptr_Function_v3float Function %30
%x_56_phi = OpVariable %_ptr_Function_bool Function %20
%x_58_phi = OpVariable %_ptr_Function_bool Function %20
%x_43_phi = OpVariable %_ptr_Function_v3float Function %30
%x_62 = OpVariable %_ptr_Function_bool Function %20
%x_62_phi = OpVariable %_ptr_Function_bool Function %20
%x_64_phi = OpVariable %_ptr_Function_bool Function %20
%x_65_phi = OpVariable %_ptr_Function_int Function %25
%x_70_phi = OpVariable %_ptr_Function_bool Function %20
%x_71_phi = OpVariable %_ptr_Function_bool Function %20
OpStore %x_36 %false
OpStore %x_40_phi %false
OpStore %x_42_phi %38
OpBranch %39
%39 = OpLabel
OpLoopMerge %40 %41 None
OpBranch %42
%42 = OpLabel
%44 = OpLoad %bool %x_40_phi
OpStore %x_40 %44
%45 = OpLoad %v3float %x_42_phi
%50 = OpAccessChain %_ptr_Uniform_float %x_5 %uint_0 %uint_1
%51 = OpLoad %float %50
OpStore %x_43_phi %45
%52 = OpFOrdLessThan %bool %51 %float_0
OpSelectionMerge %53 None
OpBranchConditional %52 %54 %53
%54 = OpLabel
OpStore %color %56
OpStore %x_43_phi %56
OpBranch %53
%53 = OpLabel
%57 = OpLoad %v3float %x_43_phi
OpStore %x_43 %57
OpBranch %41
%41 = OpLabel
%58 = OpLoad %bool %x_40
OpStore %x_40_phi %58
%59 = OpLoad %v3float %x_43
OpStore %x_42_phi %59
OpBranchConditional %false %39 %40
%40 = OpLabel
OpStore %x_36 %false
%60 = OpLoad %bool %x_40
OpStore %x_56_phi %60
OpStore %x_58_phi %false
OpBranch %61
%61 = OpLabel
OpLoopMerge %62 %63 None
OpBranch %64
%64 = OpLabel
%71 = OpLoad %bool %x_56_phi
%72 = OpLoad %bool %x_58_phi
OpStore %x_7 %int_0
OpStore %x_62_phi %71
OpStore %x_64_phi %false
OpStore %x_65_phi %int_0
OpBranch %74
%74 = OpLabel
OpLoopMerge %75 %76 None
OpBranch %77
%77 = OpLabel
%78 = OpLoad %bool %x_62_phi
OpStore %x_62 %78
%79 = OpLoad %bool %x_64_phi
%80 = OpLoad %int %x_65_phi
%82 = OpSLessThan %bool %int_0 %int_1
%83 = OpLoad %bool %x_62
OpStore %x_70_phi %83
OpStore %x_71_phi %false
OpSelectionMerge %85 None
OpBranchConditional %true %86 %87
%86 = OpLabel
OpBranch %85
%87 = OpLabel
OpBranch %75
%85 = OpLabel
OpStore %x_36 %true
OpStore %x_37 %true
OpStore %x_70_phi %true
OpStore %x_71_phi %true
OpBranch %75
%76 = OpLabel
OpStore %x_62_phi %false
OpStore %x_64_phi %false
OpStore %x_65_phi %int_0
OpBranch %74
%75 = OpLabel
%88 = OpLoad %bool %x_70_phi
%89 = OpLoad %bool %x_71_phi
OpSelectionMerge %90 None
OpBranchConditional %true %91 %90
%91 = OpLabel
OpBranch %62
%90 = OpLabel
OpStore %x_36 %true
OpBranch %62
%63 = OpLabel
OpStore %x_56_phi %false
OpStore %x_58_phi %false
OpBranch %61
%62 = OpLabel
OpStore %x_38 %true
%92 = OpSelect %float %true %float_1 %float_0
%94 = OpAccessChain %_ptr_Function_float %x_43 %uint_0
%95 = OpLoad %float %94
%96 = OpAccessChain %_ptr_Function_float %x_43 %uint_1
%97 = OpLoad %float %96
%99 = OpAccessChain %_ptr_Function_float %x_43 %uint_2
%100 = OpLoad %float %99
%101 = OpCompositeConstruct %v4float %95 %97 %100 %float_1
%102 = OpCompositeConstruct %v4float %92 %92 %92 %92
%103 = OpFAdd %v4float %101 %102
OpStore %x_GLF_color %103
OpStore %x_GLF_color %104
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %105
%tint_symbol = OpFunctionParameter %main_out
%109 = OpLabel
%110 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %110
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%112 = OpLabel
%113 = OpFunctionCall %void %main_1
%115 = OpLoad %v4float %x_GLF_color
%116 = OpCompositeConstruct %main_out %115
%114 = OpFunctionCall %void %tint_symbol_2 %116
OpReturn
OpFunctionEnd