blob: 18ca5d58dee73d95a0071ef467e8722a715e90fe [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 177
; 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_11 "x_11"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %x_24 "x_24"
OpName %x_68 "x_68"
OpName %x_17 "x_17"
OpName %x_18 "x_18"
OpName %x_19 "x_19"
OpName %x_20 "x_20"
OpName %x_69 "x_69"
OpName %tmp_float "tmp_float"
OpName %color "color"
OpName %x_25 "x_25"
OpName %x_101 "x_101"
OpName %x_79_phi "x_79_phi"
OpName %x_26_phi "x_26_phi"
OpName %tmp_struct "tmp_struct"
OpMemberName %tmp_struct 0 "nmb"
OpName %x_21_phi "x_21_phi"
OpName %x_25_phi "x_25_phi"
OpName %x_93_phi "x_93_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"
OpName %binarySearch_struct_tmp_struct_i1_1_1_ "binarySearch_struct_tmp_struct_i1_1_1_"
OpName %obj "obj"
OpName %x_112 "x_112"
OpName %x_16 "x_16"
OpName %one "one"
OpName %zero "zero"
OpName %x_27 "x_27"
OpName %x_114_phi "x_114_phi"
OpName %x_28_phi "x_28_phi"
OpName %x_15_phi "x_15_phi"
OpName %x_27_phi "x_27_phi"
OpName %x_128_phi "x_128_phi"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_11 NonWritable
OpDecorate %x_11 DescriptorSet 0
OpDecorate %x_11 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpDecorate %_arr_int_uint_1 ArrayStride 4
OpMemberDecorate %tmp_struct 0 Offset 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_11 = 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
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_int_uint_1 = OpTypeArray %int %uint_1
%_ptr_Function__arr_int_uint_1 = OpTypePointer Function %_arr_int_uint_1
%22 = OpConstantNull %_arr_int_uint_1
%bool = OpTypeBool
%false = OpConstantFalse %bool
%_ptr_Function_bool = OpTypePointer Function %bool
%27 = OpConstantNull %bool
%_ptr_Function_int = OpTypePointer Function %int
%30 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
%37 = OpConstantNull %float
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%41 = OpConstantNull %v3float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%tmp_struct = OpTypeStruct %_arr_int_uint_1
%int_0 = OpConstant %int 0
%57 = OpConstantComposite %_arr_int_uint_1 %int_0
%58 = OpConstantComposite %tmp_struct %57
%int_1 = OpConstant %int 1
%int_10 = OpConstant %int 10
%true = OpConstantTrue %bool
%int_n1 = OpConstant %int -1
%float_0 = OpConstant %float 0
%98 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%float_1 = OpConstant %float 1
%103 = OpConstantComposite %v2float %float_1 %float_1
%uint_2 = OpConstant %uint 2
%main_out = OpTypeStruct %v4float
%123 = OpTypeFunction %void %main_out
%_ptr_Function_tmp_struct = OpTypePointer Function %tmp_struct
%135 = OpTypeFunction %int %_ptr_Function_tmp_struct
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_24 = OpVariable %_ptr_Function__arr_int_uint_1 Function %22
%x_68 = OpVariable %_ptr_Function_bool Function %27
%x_17 = OpVariable %_ptr_Function_int Function %30
%x_18 = OpVariable %_ptr_Function_int Function %30
%x_19 = OpVariable %_ptr_Function_int Function %30
%x_20 = OpVariable %_ptr_Function_int Function %30
%x_69 = OpVariable %_ptr_Function_bool Function %27
%tmp_float = OpVariable %_ptr_Function_float Function %37
%color = OpVariable %_ptr_Function_v3float Function %41
%x_25 = OpVariable %_ptr_Function_int Function %30
%x_101 = OpVariable %_ptr_Function_v3float Function %41
%x_79_phi = OpVariable %_ptr_Function_bool Function %27
%x_26_phi = OpVariable %_ptr_Function_int Function %30
%x_21_phi = OpVariable %_ptr_Function_int Function %30
%x_25_phi = OpVariable %_ptr_Function_int Function %30
%x_93_phi = OpVariable %_ptr_Function_bool Function %27
OpStore %x_68 %false
OpStore %x_69 %false
OpBranch %42
%42 = OpLabel
OpLoopMerge %43 %44 None
OpBranch %45
%45 = OpLabel
%52 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_1
%53 = OpLoad %float %52
OpStore %tmp_float %53
%54 = OpCompositeConstruct %v3float %53 %53 %53
OpStore %color %54
%59 = OpCompositeExtract %_arr_int_uint_1 %58 0
OpStore %x_24 %59
OpStore %x_68 %false
OpStore %x_79_phi %false
OpBranch %60
%60 = OpLabel
OpLoopMerge %61 %62 None
OpBranch %63
%63 = OpLabel
%67 = OpLoad %bool %x_79_phi
OpStore %x_18 %int_1
OpStore %x_21_phi %int_1
OpBranch %69
%69 = OpLabel
OpLoopMerge %70 %71 None
OpBranch %72
%72 = OpLabel
%73 = OpLoad %int %x_21_phi
OpStore %x_25_phi %int_0
OpStore %x_93_phi %67
%75 = OpSGreaterThan %bool %73 %int_10
OpSelectionMerge %76 None
OpBranchConditional %75 %77 %78
%77 = OpLabel
OpBranch %76
%78 = OpLabel
OpBranch %70
%76 = OpLabel
%79 = OpISub %int %73 %int_1
OpStore %x_19 %79
%80 = OpAccessChain %_ptr_Function_int %x_24 %79
%81 = OpLoad %int %80
%82 = OpIEqual %bool %81 %int_1
OpSelectionMerge %83 None
OpBranchConditional %82 %84 %83
%84 = OpLabel
OpStore %x_68 %true
OpStore %x_17 %int_1
OpStore %x_25_phi %int_1
OpStore %x_93_phi %true
OpBranch %70
%83 = OpLabel
OpStore %x_18 %79
OpBranch %71
%71 = OpLabel
OpStore %x_21_phi %79
OpBranch %69
%70 = OpLabel
%86 = OpLoad %int %x_25_phi
OpStore %x_25 %86
%87 = OpLoad %bool %x_93_phi
%88 = OpLoad %int %x_25
OpStore %x_26_phi %88
OpSelectionMerge %89 None
OpBranchConditional %87 %90 %89
%90 = OpLabel
OpBranch %61
%89 = OpLabel
OpStore %x_68 %true
OpStore %x_17 %int_n1
OpStore %x_26_phi %int_n1
OpBranch %61
%62 = OpLabel
OpStore %x_79_phi %false
OpBranch %60
%61 = OpLabel
%92 = OpLoad %int %x_26_phi
OpStore %x_20 %92
%93 = OpIEqual %bool %92 %int_n1
OpSelectionMerge %94 None
OpBranchConditional %93 %95 %96
%95 = OpLabel
OpKill
%96 = OpLabel
OpStore %x_GLF_color %98
%99 = OpCompositeExtract %float %54 1
%100 = OpCompositeExtract %float %54 2
%101 = OpCompositeConstruct %v2float %99 %100
%104 = OpFAdd %v2float %101 %103
%105 = OpCompositeExtract %float %54 0
%106 = OpCompositeExtract %float %104 0
%107 = OpCompositeExtract %float %104 1
%108 = OpCompositeConstruct %v3float %105 %106 %107
OpStore %x_101 %108
%109 = OpLoad %v3float %x_101
OpStore %color %109
%110 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_0
%111 = OpLoad %float %110
%112 = OpFOrdGreaterThan %bool %111 %float_1
OpSelectionMerge %113 None
OpBranchConditional %112 %114 %113
%114 = OpLabel
OpStore %x_69 %true
OpBranch %43
%113 = OpLabel
OpBranch %94
%94 = OpLabel
%115 = OpAccessChain %_ptr_Function_float %x_101 %uint_0
%116 = OpLoad %float %115
%117 = OpAccessChain %_ptr_Function_float %x_101 %uint_1
%118 = OpLoad %float %117
%120 = OpAccessChain %_ptr_Function_float %x_101 %uint_2
%121 = OpLoad %float %120
%122 = OpCompositeConstruct %v4float %116 %118 %121 %float_1
OpStore %x_GLF_color %122
OpStore %x_69 %true
OpBranch %43
%44 = OpLabel
OpBranch %42
%43 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %123
%tint_symbol = OpFunctionParameter %main_out
%127 = OpLabel
%128 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %128
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
%130 = OpLabel
%131 = OpFunctionCall %void %main_1
%133 = OpLoad %v4float %x_GLF_color
%134 = OpCompositeConstruct %main_out %133
%132 = OpFunctionCall %void %tint_symbol_2 %134
OpReturn
OpFunctionEnd
%binarySearch_struct_tmp_struct_i1_1_1_ = OpFunction %int None %135
%obj = OpFunctionParameter %_ptr_Function_tmp_struct
%139 = OpLabel
%x_112 = OpVariable %_ptr_Function_bool Function %27
%x_16 = OpVariable %_ptr_Function_int Function %30
%one = OpVariable %_ptr_Function_int Function %30
%zero = OpVariable %_ptr_Function_int Function %30
%x_27 = OpVariable %_ptr_Function_int Function %30
%x_114_phi = OpVariable %_ptr_Function_bool Function %27
%x_28_phi = OpVariable %_ptr_Function_int Function %30
%x_15_phi = OpVariable %_ptr_Function_int Function %30
%x_27_phi = OpVariable %_ptr_Function_int Function %30
%x_128_phi = OpVariable %_ptr_Function_bool Function %27
OpStore %x_112 %false
OpStore %x_114_phi %false
OpBranch %147
%147 = OpLabel
OpLoopMerge %148 %149 None
OpBranch %150
%150 = OpLabel
%154 = OpLoad %bool %x_114_phi
OpStore %one %int_1
OpStore %x_15_phi %int_1
OpBranch %155
%155 = OpLabel
OpLoopMerge %156 %157 None
OpBranch %158
%158 = OpLabel
%159 = OpLoad %int %x_15_phi
OpStore %x_27_phi %int_0
OpStore %x_128_phi %154
%160 = OpSGreaterThan %bool %159 %int_10
OpSelectionMerge %161 None
OpBranchConditional %160 %162 %163
%162 = OpLabel
OpBranch %161
%163 = OpLabel
OpBranch %156
%161 = OpLabel
%164 = OpISub %int %159 %int_1
OpStore %zero %164
%166 = OpAccessChain %_ptr_Function_int %obj %uint_0 %164
%167 = OpLoad %int %166
%168 = OpIEqual %bool %167 %int_1
OpSelectionMerge %169 None
OpBranchConditional %168 %170 %169
%170 = OpLabel
OpStore %x_112 %true
OpStore %x_16 %int_1
OpStore %x_27_phi %int_1
OpStore %x_128_phi %true
OpBranch %156
%169 = OpLabel
OpStore %one %164
OpBranch %157
%157 = OpLabel
OpStore %x_15_phi %164
OpBranch %155
%156 = OpLabel
%171 = OpLoad %int %x_27_phi
OpStore %x_27 %171
%172 = OpLoad %bool %x_128_phi
%173 = OpLoad %int %x_27
OpStore %x_28_phi %173
OpSelectionMerge %174 None
OpBranchConditional %172 %175 %174
%175 = OpLabel
OpBranch %148
%174 = OpLabel
OpStore %x_112 %true
OpStore %x_16 %int_n1
OpStore %x_28_phi %int_n1
OpBranch %148
%149 = OpLabel
OpStore %x_114_phi %false
OpBranch %147
%148 = OpLabel
%176 = OpLoad %int %x_28_phi
OpReturnValue %176
OpFunctionEnd