blob: e4c4488abc5370db7e5b967ae5a9f7fcda1c4009 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 288
; Schema: 0
OpCapability Shader
%59 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf1 "buf1"
OpMemberName %buf1 0 "injectionSwitch"
OpName %x_6 "x_6"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "resolution"
OpName %x_9 "x_9"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %c "c"
OpName %x_54 "x_54"
OpName %x_58 "x_58"
OpName %x_59 "x_59"
OpName %x_91 "x_91"
OpName %x_92 "x_92"
OpName %x_135 "x_135"
OpName %x_136 "x_136"
OpName %x_58_phi "x_58_phi"
OpName %x_61_phi "x_61_phi"
OpName %x_91_phi "x_91_phi"
OpName %x_92_phi "x_92_phi"
OpName %x_93_phi "x_93_phi"
OpName %x_95_phi "x_95_phi"
OpName %x_139_phi "x_139_phi"
OpName %x_146_phi "x_146_phi"
OpName %x_71 "x_71"
OpName %x_79 "x_79"
OpName %x_62 "x_62"
OpName %x_59_phi "x_59_phi"
OpName %x_78 "x_78"
OpName %x_79_phi "x_79_phi"
OpName %x_98 "x_98"
OpName %x_102 "x_102"
OpName %x_103 "x_103"
OpName %x_102_phi "x_102_phi"
OpName %x_105_phi "x_105_phi"
OpName %x_135_phi "x_135_phi"
OpName %x_136_phi "x_136_phi"
OpName %x_137_phi "x_137_phi"
OpName %x_115 "x_115"
OpName %x_123 "x_123"
OpName %x_106 "x_106"
OpName %x_103_phi "x_103_phi"
OpName %x_122 "x_122"
OpName %x_123_phi "x_123_phi"
OpName %x_147 "x_147"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 1
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_6 = OpVariable %_ptr_Uniform_buf1 Uniform
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_9 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%12 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %12
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %12
%void = OpTypeVoid
%18 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%25 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
%28 = OpConstantNull %float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%39 = OpConstantNull %int
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%45 = OpConstantNull %bool
%float_7 = OpConstant %float 7
%float_8 = OpConstant %float 8
%float_9 = OpConstant %float 9
%52 = OpConstantComposite %v3float %float_7 %float_8 %float_9
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_0_125 = OpConstant %float 0.125
%_ptr_Private_float = OpTypePointer Private %float
%float_n0_5 = OpConstant %float -0.5
%int_1 = OpConstant %int 1
%float_0 = OpConstant %float 0
%false = OpConstantFalse %bool
%int_800 = OpConstant %int 800
%int_32 = OpConstant %int 32
%int_0 = OpConstant %int 0
%float_0_400000006 = OpConstant %float 0.400000006
%float_0_00999999978 = OpConstant %float 0.00999999978
%float_100 = OpConstant %float 100
%uint_1 = OpConstant %uint 1
%true = OpConstantTrue %bool
%uint_2 = OpConstant %uint 2
%int_3 = OpConstant %int 3
%float_1 = OpConstant %float 1
%main_out = OpTypeStruct %v4float
%275 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %18
%21 = OpLabel
%c = OpVariable %_ptr_Function_v3float Function %25
%x_54 = OpVariable %_ptr_Function_float Function %28
%x_58 = OpVariable %_ptr_Function_float Function %28
%x_59 = OpVariable %_ptr_Function_float Function %28
%x_91 = OpVariable %_ptr_Function_float Function %28
%x_92 = OpVariable %_ptr_Function_float Function %28
%x_135 = OpVariable %_ptr_Function_float Function %28
%x_136 = OpVariable %_ptr_Function_float Function %28
%x_58_phi = OpVariable %_ptr_Function_float Function %28
%x_61_phi = OpVariable %_ptr_Function_int Function %39
%x_91_phi = OpVariable %_ptr_Function_float Function %28
%x_92_phi = OpVariable %_ptr_Function_float Function %28
%x_93_phi = OpVariable %_ptr_Function_bool Function %45
%x_95_phi = OpVariable %_ptr_Function_float Function %28
%x_139_phi = OpVariable %_ptr_Function_float Function %28
%x_146_phi = OpVariable %_ptr_Function_int Function %39
%x_71 = OpVariable %_ptr_Function_float Function %28
%x_79 = OpVariable %_ptr_Function_float Function %28
%x_62 = OpVariable %_ptr_Function_int Function %39
%x_59_phi = OpVariable %_ptr_Function_float Function %28
%x_78 = OpVariable %_ptr_Function_float Function %28
%x_79_phi = OpVariable %_ptr_Function_float Function %28
%x_98 = OpVariable %_ptr_Function_float Function %28
%x_102 = OpVariable %_ptr_Function_float Function %28
%x_103 = OpVariable %_ptr_Function_float Function %28
%x_102_phi = OpVariable %_ptr_Function_float Function %28
%x_105_phi = OpVariable %_ptr_Function_int Function %39
%x_135_phi = OpVariable %_ptr_Function_float Function %28
%x_136_phi = OpVariable %_ptr_Function_float Function %28
%x_137_phi = OpVariable %_ptr_Function_bool Function %45
%x_115 = OpVariable %_ptr_Function_float Function %28
%x_123 = OpVariable %_ptr_Function_float Function %28
%x_106 = OpVariable %_ptr_Function_int Function %39
%x_103_phi = OpVariable %_ptr_Function_float Function %28
%x_122 = OpVariable %_ptr_Function_float Function %28
%x_123_phi = OpVariable %_ptr_Function_float Function %28
%x_147 = OpVariable %_ptr_Function_int Function %39
OpStore %c %52
%56 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_0
%57 = OpLoad %float %56
%61 = OpFMul %float %57 %float_0_125
%58 = OpExtInst %float %59 RoundEven %61
%63 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%64 = OpLoad %float %63
OpStore %x_54 %64
OpSelectionMerge %65 None
OpSwitch %uint_0 %66
%66 = OpLabel
OpStore %x_58_phi %float_n0_5
OpStore %x_61_phi %int_1
OpBranch %69
%69 = OpLabel
OpLoopMerge %70 %71 None
OpBranch %72
%72 = OpLabel
%77 = OpLoad %float %x_58_phi
OpStore %x_58 %77
%78 = OpLoad %int %x_61_phi
OpStore %x_91_phi %float_0
%80 = OpLoad %float %x_58
OpStore %x_92_phi %80
OpStore %x_93_phi %false
%83 = OpSLessThan %bool %78 %int_800
OpSelectionMerge %84 None
OpBranchConditional %83 %85 %86
%85 = OpLabel
OpBranch %84
%86 = OpLabel
OpBranch %70
%84 = OpLabel
%90 = OpSMod %int %78 %int_32
%92 = OpIEqual %bool %90 %int_0
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %95
%94 = OpLabel
%96 = OpLoad %float %x_58
%98 = OpFAdd %float %96 %float_0_400000006
OpStore %x_71 %98
%99 = OpLoad %float %x_71
OpStore %x_59_phi %99
OpBranch %93
%95 = OpLabel
%100 = OpLoad %float %x_58
OpStore %x_79_phi %100
%101 = OpConvertSToF %float %78
%102 = OpExtInst %float %59 RoundEven %58
%104 = OpConvertSToF %float %78
%105 = OpExtInst %float %59 RoundEven %58
%106 = OpFDiv %float %104 %105
%103 = OpExtInst %float %59 Floor %106
%107 = OpFMul %float %102 %103
%108 = OpFSub %float %101 %107
%110 = OpFOrdLessThanEqual %bool %108 %float_0_00999999978
OpSelectionMerge %111 None
OpBranchConditional %110 %112 %111
%112 = OpLabel
%113 = OpLoad %float %x_58
%115 = OpFAdd %float %113 %float_100
OpStore %x_78 %115
%116 = OpLoad %float %x_78
OpStore %x_79_phi %116
OpBranch %111
%111 = OpLabel
%117 = OpLoad %float %x_79_phi
OpStore %x_79 %117
%118 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0
%119 = OpLoad %float %118
%121 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
%122 = OpLoad %float %121
%123 = OpFOrdGreaterThan %bool %119 %122
OpSelectionMerge %124 None
OpBranchConditional %123 %125 %124
%125 = OpLabel
OpKill
%124 = OpLabel
%126 = OpLoad %float %x_79
OpStore %x_59_phi %126
OpBranch %93
%93 = OpLabel
%127 = OpLoad %float %x_59_phi
OpStore %x_59 %127
%128 = OpConvertSToF %float %78
%129 = OpLoad %float %x_54
%130 = OpFOrdGreaterThanEqual %bool %128 %129
OpSelectionMerge %131 None
OpBranchConditional %130 %132 %131
%132 = OpLabel
%133 = OpLoad %float %x_59
OpStore %x_91_phi %133
%134 = OpLoad %float %x_59
OpStore %x_92_phi %134
OpStore %x_93_phi %true
OpBranch %70
%131 = OpLabel
OpBranch %71
%71 = OpLabel
%136 = OpIAdd %int %78 %int_1
OpStore %x_62 %136
%137 = OpLoad %float %x_59
OpStore %x_58_phi %137
%138 = OpLoad %int %x_62
OpStore %x_61_phi %138
OpBranch %69
%70 = OpLabel
%139 = OpLoad %float %x_91_phi
OpStore %x_91 %139
%140 = OpLoad %float %x_92_phi
OpStore %x_92 %140
%141 = OpLoad %bool %x_93_phi
%142 = OpLoad %float %x_91
OpStore %x_95_phi %142
OpSelectionMerge %143 None
OpBranchConditional %141 %144 %143
%144 = OpLabel
OpBranch %65
%143 = OpLabel
%145 = OpLoad %float %x_92
OpStore %x_95_phi %145
OpBranch %65
%65 = OpLabel
%154 = OpLoad %float %x_95_phi
%155 = OpAccessChain %_ptr_Function_float %c %uint_0
OpStore %155 %154
%156 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%157 = OpLoad %float %156
OpStore %x_98 %157
OpSelectionMerge %158 None
OpSwitch %uint_0 %159
%159 = OpLabel
OpStore %x_102_phi %float_n0_5
OpStore %x_105_phi %int_1
OpBranch %160
%160 = OpLabel
OpLoopMerge %161 %162 None
OpBranch %163
%163 = OpLabel
%168 = OpLoad %float %x_102_phi
OpStore %x_102 %168
%169 = OpLoad %int %x_105_phi
OpStore %x_135_phi %float_0
%170 = OpLoad %float %x_102
OpStore %x_136_phi %170
OpStore %x_137_phi %false
%171 = OpSLessThan %bool %169 %int_800
OpSelectionMerge %172 None
OpBranchConditional %171 %173 %174
%173 = OpLabel
OpBranch %172
%174 = OpLabel
OpBranch %161
%172 = OpLabel
%177 = OpSMod %int %169 %int_32
%178 = OpIEqual %bool %177 %int_0
OpSelectionMerge %179 None
OpBranchConditional %178 %180 %181
%180 = OpLabel
%182 = OpLoad %float %x_102
%183 = OpFAdd %float %182 %float_0_400000006
OpStore %x_115 %183
%184 = OpLoad %float %x_115
OpStore %x_103_phi %184
OpBranch %179
%181 = OpLabel
%185 = OpLoad %float %x_102
OpStore %x_123_phi %185
%186 = OpConvertSToF %float %169
%187 = OpExtInst %float %59 RoundEven %58
%189 = OpConvertSToF %float %169
%190 = OpExtInst %float %59 RoundEven %58
%191 = OpFDiv %float %189 %190
%188 = OpExtInst %float %59 Floor %191
%192 = OpFMul %float %187 %188
%193 = OpFSub %float %186 %192
%194 = OpFOrdLessThanEqual %bool %193 %float_0_00999999978
OpSelectionMerge %195 None
OpBranchConditional %194 %196 %195
%196 = OpLabel
%197 = OpLoad %float %x_102
%198 = OpFAdd %float %197 %float_100
OpStore %x_122 %198
%199 = OpLoad %float %x_122
OpStore %x_123_phi %199
OpBranch %195
%195 = OpLabel
%200 = OpLoad %float %x_123_phi
OpStore %x_123 %200
%201 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0
%202 = OpLoad %float %201
%203 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
%204 = OpLoad %float %203
%205 = OpFOrdGreaterThan %bool %202 %204
OpSelectionMerge %206 None
OpBranchConditional %205 %207 %206
%207 = OpLabel
OpKill
%206 = OpLabel
%208 = OpLoad %float %x_123
OpStore %x_103_phi %208
OpBranch %179
%179 = OpLabel
%209 = OpLoad %float %x_103_phi
OpStore %x_103 %209
%210 = OpConvertSToF %float %169
%211 = OpLoad %float %x_98
%212 = OpFOrdGreaterThanEqual %bool %210 %211
OpSelectionMerge %213 None
OpBranchConditional %212 %214 %213
%214 = OpLabel
%215 = OpLoad %float %x_103
OpStore %x_135_phi %215
%216 = OpLoad %float %x_103
OpStore %x_136_phi %216
OpStore %x_137_phi %true
OpBranch %161
%213 = OpLabel
OpBranch %162
%162 = OpLabel
%217 = OpIAdd %int %169 %int_1
OpStore %x_106 %217
%218 = OpLoad %float %x_103
OpStore %x_102_phi %218
%219 = OpLoad %int %x_106
OpStore %x_105_phi %219
OpBranch %160
%161 = OpLabel
%220 = OpLoad %float %x_135_phi
OpStore %x_135 %220
%221 = OpLoad %float %x_136_phi
OpStore %x_136 %221
%222 = OpLoad %bool %x_137_phi
%223 = OpLoad %float %x_135
OpStore %x_139_phi %223
OpSelectionMerge %224 None
OpBranchConditional %222 %225 %224
%225 = OpLabel
OpBranch %158
%224 = OpLabel
%226 = OpLoad %float %x_136
OpStore %x_139_phi %226
OpBranch %158
%158 = OpLabel
%227 = OpLoad %float %x_139_phi
%228 = OpAccessChain %_ptr_Function_float %c %uint_1
OpStore %228 %227
%229 = OpAccessChain %_ptr_Function_float %c %uint_0
%230 = OpLoad %float %229
%231 = OpAccessChain %_ptr_Function_float %c %uint_1
%232 = OpLoad %float %231
%234 = OpAccessChain %_ptr_Function_float %c %uint_2
%235 = OpFAdd %float %230 %232
OpStore %234 %235
OpStore %x_146_phi %int_0
OpBranch %236
%236 = OpLabel
OpLoopMerge %237 %238 None
OpBranch %239
%239 = OpLabel
%241 = OpLoad %int %x_146_phi
%243 = OpSLessThan %bool %241 %int_3
OpSelectionMerge %244 None
OpBranchConditional %243 %245 %246
%245 = OpLabel
OpBranch %244
%246 = OpLabel
OpBranch %237
%244 = OpLabel
%247 = OpAccessChain %_ptr_Function_float %c %241
%248 = OpLoad %float %247
%250 = OpFOrdGreaterThanEqual %bool %248 %float_1
OpSelectionMerge %251 None
OpBranchConditional %250 %252 %251
%252 = OpLabel
%253 = OpAccessChain %_ptr_Function_float %c %241
%254 = OpLoad %float %253
%255 = OpAccessChain %_ptr_Function_float %c %241
%256 = OpLoad %float %255
%257 = OpAccessChain %_ptr_Function_float %c %241
%258 = OpFMul %float %254 %256
OpStore %257 %258
%259 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0
%260 = OpLoad %float %259
%261 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1
%262 = OpLoad %float %261
%263 = OpFOrdGreaterThan %bool %260 %262
OpSelectionMerge %264 None
OpBranchConditional %263 %265 %264
%265 = OpLabel
OpKill
%264 = OpLabel
OpBranch %251
%251 = OpLabel
OpBranch %238
%238 = OpLabel
%266 = OpIAdd %int %241 %int_1
OpStore %x_147 %266
%267 = OpLoad %int %x_147
OpStore %x_146_phi %267
OpBranch %236
%237 = OpLabel
%268 = OpLoad %v3float %c
%270 = OpExtInst %v3float %59 FAbs %268
%269 = OpExtInst %v3float %59 Normalize %270
%271 = OpCompositeExtract %float %269 0
%272 = OpCompositeExtract %float %269 1
%273 = OpCompositeExtract %float %269 2
%274 = OpCompositeConstruct %v4float %271 %272 %273 %float_1
OpStore %x_GLF_color %274
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %275
%tint_symbol_1 = OpFunctionParameter %main_out
%279 = OpLabel
%280 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %280
OpReturn
OpFunctionEnd
%main = OpFunction %void None %18
%282 = OpLabel
%283 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %283
%284 = OpFunctionCall %void %main_1
%286 = OpLoad %v4float %x_GLF_color
%287 = OpCompositeConstruct %main_out %286
%285 = OpFunctionCall %void %tint_symbol_3 %287
OpReturn
OpFunctionEnd