David Neto dffa60ca98 spir-writer: handle break continuing block
The continuing block can exit the loop in very constrained ways:

When a break statement is placed such that it would exit from a loop’s
§ 7.3.8 Continuing Statement, then:

   - The break statement must appear as either:
     - The only statement in the if clause of an if statement that has:
       - no else clause or an empty else clause
       - no elseif clauses
     - The only statement in the else clause of an if statement that has an
       empty if clause and no elseif clauses.
   - That if statement must appear last in the continuing clause.

By design, this allows a lossless round-trip from SPIR-V to WGSL and
back to SPIR-V.  But that requires this special case construct in WGSL
to be translated to an OpBranchConditional with one target being
the loop's megre block (which is where 'break' branches to), and the
other targets the loop header (which is the loop backedge).  That
OpBranchConditional takes the place of the normal case of an
unconditional backedge.

Avoids errors like this:
 continue construct with the continue target X is not
 post dominated by the back-edge block Y

Fixed: 1034
Change-Id: If472a179380b8d77af746a3cd8e279c8a5e56b37
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59800
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-07-27 15:12:27 +00:00

647 lines
24 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 416
; Schema: 0
OpCapability Shader
%176 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %data "data"
OpName %temp "temp"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_28 "x_28"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "resolution"
OpName %x_32 "x_32"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %merge_i1_i1_i1_ "merge_i1_i1_i1_"
OpName %from "from"
OpName %mid "mid"
OpName %to "to"
OpName %k "k"
OpName %i "i"
OpName %j "j"
OpName %i_1 "i_1"
OpName %mergeSort_ "mergeSort_"
OpName %low "low"
OpName %high "high"
OpName %m "m"
OpName %i_2 "i_2"
OpName %from_1 "from_1"
OpName %mid_1 "mid_1"
OpName %to_1 "to_1"
OpName %param "param"
OpName %param_1 "param_1"
OpName %param_2 "param_2"
OpName %main_1 "main_1"
OpName %i_3 "i_3"
OpName %j_1 "j_1"
OpName %grey "grey"
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 %_arr_int_uint_10 ArrayStride 4
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_28 NonWritable
OpDecorate %x_28 DescriptorSet 0
OpDecorate %x_28 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_32 NonWritable
OpDecorate %x_32 DescriptorSet 0
OpDecorate %x_32 Binding 1
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%_arr_int_uint_10 = OpTypeArray %int %uint_10
%_ptr_Private__arr_int_uint_10 = OpTypePointer Private %_arr_int_uint_10
%7 = OpConstantNull %_arr_int_uint_10
%data = OpVariable %_ptr_Private__arr_int_uint_10 Private %7
%temp = OpVariable %_ptr_Private__arr_int_uint_10 Private %7
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_28 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %17
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_32 = OpVariable %_ptr_Uniform_buf1 Uniform
%_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 %17
%void = OpTypeVoid
%_ptr_Function_int = OpTypePointer Function %int
%26 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_int
%35 = OpConstantNull %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%_ptr_Private_int = OpTypePointer Private %int
%int_10 = OpConstant %int 10
%131 = OpTypeFunction %void
%int_0 = OpConstant %int 0
%int_9 = OpConstant %int 9
%int_2 = OpConstant %int 2
%_ptr_Function_float = OpTypePointer Function %float
%200 = OpConstantNull %float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_n5 = OpConstant %int -5
%true = OpConstantTrue %bool
%int_n4 = OpConstant %int -4
%int_n3 = OpConstant %int -3
%int_n2 = OpConstant %int -2
%int_n1 = OpConstant %int -1
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%int_30 = OpConstant %int 30
%float_0_5 = OpConstant %float 0.5
%float_10 = OpConstant %float 10
%int_60 = OpConstant %int 60
%int_90 = OpConstant %int 90
%int_120 = OpConstant %int 120
%int_150 = OpConstant %int 150
%int_180 = OpConstant %int 180
%int_5 = OpConstant %int 5
%int_210 = OpConstant %int 210
%int_6 = OpConstant %int 6
%int_240 = OpConstant %int 240
%int_7 = OpConstant %int 7
%int_270 = OpConstant %int 270
%int_8 = OpConstant %int 8
%v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%main_out = OpTypeStruct %v4float
%403 = OpTypeFunction %void %main_out
%merge_i1_i1_i1_ = OpFunction %void None %26
%from = OpFunctionParameter %_ptr_Function_int
%mid = OpFunctionParameter %_ptr_Function_int
%to = OpFunctionParameter %_ptr_Function_int
%33 = OpLabel
%k = OpVariable %_ptr_Function_int Function %35
%i = OpVariable %_ptr_Function_int Function %35
%j = OpVariable %_ptr_Function_int Function %35
%i_1 = OpVariable %_ptr_Function_int Function %35
%40 = OpLoad %int %from
OpStore %k %40
%42 = OpLoad %int %from
OpStore %i %42
%44 = OpLoad %int %mid
%46 = OpIAdd %int %44 %int_1
OpStore %j %46
OpBranch %47
%47 = OpLabel
OpLoopMerge %48 %49 None
OpBranch %50
%50 = OpLabel
%51 = OpLoad %int %i
%53 = OpLoad %int %mid
%54 = OpLoad %int %j
%56 = OpLoad %int %to
%57 = OpSLessThanEqual %bool %51 %53
%59 = OpSLessThanEqual %bool %54 %56
%60 = OpLogicalAnd %bool %57 %59
OpSelectionMerge %61 None
OpBranchConditional %60 %62 %63
%62 = OpLabel
OpBranch %61
%63 = OpLabel
OpBranch %48
%61 = OpLabel
%64 = OpLoad %int %i
%66 = OpAccessChain %_ptr_Private_int %data %64
%67 = OpLoad %int %66
%68 = OpLoad %int %j
%69 = OpAccessChain %_ptr_Private_int %data %68
%70 = OpLoad %int %69
%71 = OpSLessThan %bool %67 %70
OpSelectionMerge %72 None
OpBranchConditional %71 %73 %74
%73 = OpLabel
%75 = OpLoad %int %k
%76 = OpIAdd %int %75 %int_1
OpStore %k %76
%77 = OpLoad %int %i
%78 = OpIAdd %int %77 %int_1
OpStore %i %78
%79 = OpAccessChain %_ptr_Private_int %data %77
%80 = OpLoad %int %79
%81 = OpAccessChain %_ptr_Private_int %temp %75
OpStore %81 %80
OpBranch %72
%74 = OpLabel
%82 = OpLoad %int %k
%83 = OpIAdd %int %82 %int_1
OpStore %k %83
%84 = OpLoad %int %j
%85 = OpIAdd %int %84 %int_1
OpStore %j %85
%86 = OpAccessChain %_ptr_Private_int %data %84
%87 = OpLoad %int %86
%88 = OpAccessChain %_ptr_Private_int %temp %82
OpStore %88 %87
OpBranch %72
%72 = OpLabel
OpBranch %49
%49 = OpLabel
OpBranch %47
%48 = OpLabel
OpBranch %89
%89 = OpLabel
OpLoopMerge %90 %91 None
OpBranch %92
%92 = OpLabel
%93 = OpLoad %int %i
%94 = OpLoad %int %i
%96 = OpLoad %int %mid
%98 = OpSLessThan %bool %93 %int_10
%99 = OpSLessThanEqual %bool %94 %96
%100 = OpLogicalAnd %bool %98 %99
OpSelectionMerge %101 None
OpBranchConditional %100 %102 %103
%102 = OpLabel
OpBranch %101
%103 = OpLabel
OpBranch %90
%101 = OpLabel
%104 = OpLoad %int %k
%105 = OpIAdd %int %104 %int_1
OpStore %k %105
%106 = OpLoad %int %i
%107 = OpIAdd %int %106 %int_1
OpStore %i %107
%108 = OpAccessChain %_ptr_Private_int %data %106
%109 = OpLoad %int %108
%110 = OpAccessChain %_ptr_Private_int %temp %104
OpStore %110 %109
OpBranch %91
%91 = OpLabel
OpBranch %89
%90 = OpLabel
%112 = OpLoad %int %from
OpStore %i_1 %112
OpBranch %113
%113 = OpLabel
OpLoopMerge %114 %115 None
OpBranch %116
%116 = OpLabel
%117 = OpLoad %int %i_1
%119 = OpLoad %int %to
%120 = OpSLessThanEqual %bool %117 %119
OpSelectionMerge %121 None
OpBranchConditional %120 %122 %123
%122 = OpLabel
OpBranch %121
%123 = OpLabel
OpBranch %114
%121 = OpLabel
%124 = OpLoad %int %i_1
%125 = OpLoad %int %i_1
%126 = OpAccessChain %_ptr_Private_int %temp %125
%127 = OpLoad %int %126
%128 = OpAccessChain %_ptr_Private_int %data %124
OpStore %128 %127
OpBranch %115
%115 = OpLabel
%129 = OpLoad %int %i_1
%130 = OpIAdd %int %129 %int_1
OpStore %i_1 %130
OpBranch %113
%114 = OpLabel
OpReturn
OpFunctionEnd
%mergeSort_ = OpFunction %void None %131
%133 = OpLabel
%low = OpVariable %_ptr_Function_int Function %35
%high = OpVariable %_ptr_Function_int Function %35
%m = OpVariable %_ptr_Function_int Function %35
%i_2 = OpVariable %_ptr_Function_int Function %35
%from_1 = OpVariable %_ptr_Function_int Function %35
%mid_1 = OpVariable %_ptr_Function_int Function %35
%to_1 = OpVariable %_ptr_Function_int Function %35
%param = OpVariable %_ptr_Function_int Function %35
%param_1 = OpVariable %_ptr_Function_int Function %35
%param_2 = OpVariable %_ptr_Function_int Function %35
OpStore %low %int_0
OpStore %high %int_9
OpStore %m %int_1
OpBranch %146
%146 = OpLabel
OpLoopMerge %147 %148 None
OpBranch %149
%149 = OpLabel
%150 = OpLoad %int %m
%151 = OpLoad %int %high
%152 = OpSLessThanEqual %bool %150 %151
OpSelectionMerge %153 None
OpBranchConditional %152 %154 %155
%154 = OpLabel
OpBranch %153
%155 = OpLabel
OpBranch %147
%153 = OpLabel
%156 = OpLoad %int %low
OpStore %i_2 %156
OpBranch %157
%157 = OpLabel
OpLoopMerge %158 %159 None
OpBranch %160
%160 = OpLabel
%161 = OpLoad %int %i_2
%162 = OpLoad %int %high
%163 = OpSLessThan %bool %161 %162
OpSelectionMerge %164 None
OpBranchConditional %163 %165 %166
%165 = OpLabel
OpBranch %164
%166 = OpLabel
OpBranch %158
%164 = OpLabel
%167 = OpLoad %int %i_2
OpStore %from_1 %167
%168 = OpLoad %int %i_2
%169 = OpLoad %int %m
%170 = OpIAdd %int %168 %169
%171 = OpISub %int %170 %int_1
OpStore %mid_1 %171
%172 = OpLoad %int %i_2
%173 = OpLoad %int %m
%174 = OpLoad %int %high
%178 = OpIMul %int %int_2 %173
%179 = OpIAdd %int %172 %178
%180 = OpISub %int %179 %int_1
%175 = OpExtInst %int %176 SMin %180 %174
OpStore %to_1 %175
%181 = OpLoad %int %from_1
OpStore %param %181
%182 = OpLoad %int %mid_1
OpStore %param_1 %182
%183 = OpLoad %int %to_1
OpStore %param_2 %183
%184 = OpFunctionCall %void %merge_i1_i1_i1_ %param %param_1 %param_2
OpBranch %159
%159 = OpLabel
%188 = OpLoad %int %m
%189 = OpLoad %int %i_2
%190 = OpIMul %int %int_2 %188
%191 = OpIAdd %int %189 %190
OpStore %i_2 %191
OpBranch %157
%158 = OpLabel
OpBranch %148
%148 = OpLabel
%192 = OpLoad %int %m
%193 = OpIMul %int %int_2 %192
OpStore %m %193
OpBranch %146
%147 = OpLabel
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %131
%195 = OpLabel
%i_3 = OpVariable %_ptr_Function_int Function %35
%j_1 = OpVariable %_ptr_Function_int Function %35
%grey = OpVariable %_ptr_Function_float Function %200
%203 = OpAccessChain %_ptr_Uniform_float %x_28 %uint_0 %uint_0
%204 = OpLoad %float %203
%205 = OpConvertFToS %int %204
OpStore %i_3 %205
OpBranch %206
%206 = OpLabel
OpLoopMerge %207 %208 None
OpBranch %209
%209 = OpLabel
%210 = OpLoad %int %i_3
OpSelectionMerge %211 None
OpSwitch %210 %212 9 %213 8 %214 7 %215 6 %216 5 %217 4 %218 3 %219 2 %220 1 %221 0 %222
%213 = OpLabel
%223 = OpLoad %int %i_3
%224 = OpAccessChain %_ptr_Private_int %data %223
OpStore %224 %int_n5
OpSelectionMerge %227 None
OpBranchConditional %true %228 %229
%228 = OpLabel
OpBranch %227
%229 = OpLabel
OpBranch %208
%227 = OpLabel
OpBranch %211
%214 = OpLabel
%230 = OpLoad %int %i_3
%231 = OpAccessChain %_ptr_Private_int %data %230
OpStore %231 %int_n4
OpBranch %211
%215 = OpLabel
%233 = OpLoad %int %i_3
%234 = OpAccessChain %_ptr_Private_int %data %233
OpStore %234 %int_n3
OpBranch %211
%216 = OpLabel
%236 = OpLoad %int %i_3
%237 = OpAccessChain %_ptr_Private_int %data %236
OpStore %237 %int_n2
OpBranch %211
%217 = OpLabel
%239 = OpLoad %int %i_3
%240 = OpAccessChain %_ptr_Private_int %data %239
OpStore %240 %int_n1
OpBranch %211
%218 = OpLabel
%242 = OpLoad %int %i_3
%243 = OpAccessChain %_ptr_Private_int %data %242
OpStore %243 %int_0
OpBranch %211
%219 = OpLabel
%244 = OpLoad %int %i_3
%245 = OpAccessChain %_ptr_Private_int %data %244
OpStore %245 %int_1
OpBranch %211
%220 = OpLabel
%246 = OpLoad %int %i_3
%247 = OpAccessChain %_ptr_Private_int %data %246
OpStore %247 %int_2
OpBranch %211
%221 = OpLabel
%248 = OpLoad %int %i_3
%249 = OpAccessChain %_ptr_Private_int %data %248
OpStore %249 %int_3
OpBranch %211
%222 = OpLabel
%251 = OpLoad %int %i_3
%252 = OpAccessChain %_ptr_Private_int %data %251
OpStore %252 %int_4
OpBranch %211
%212 = OpLabel
OpBranch %211
%211 = OpLabel
%254 = OpLoad %int %i_3
%255 = OpIAdd %int %254 %int_1
OpStore %i_3 %255
OpBranch %208
%208 = OpLabel
%256 = OpLoad %int %i_3
%257 = OpSLessThan %bool %256 %int_10
OpBranchConditional %257 %206 %207
%207 = OpLabel
OpStore %j_1 %int_0
OpBranch %258
%258 = OpLabel
OpLoopMerge %259 %260 None
OpBranch %261
%261 = OpLabel
%262 = OpLoad %int %j_1
%263 = OpSLessThan %bool %262 %int_10
OpSelectionMerge %264 None
OpBranchConditional %263 %265 %266
%265 = OpLabel
OpBranch %264
%266 = OpLabel
OpBranch %259
%264 = OpLabel
%267 = OpLoad %int %j_1
%268 = OpLoad %int %j_1
%269 = OpAccessChain %_ptr_Private_int %data %268
%270 = OpLoad %int %269
%271 = OpAccessChain %_ptr_Private_int %temp %267
OpStore %271 %270
OpBranch %260
%260 = OpLabel
%272 = OpLoad %int %j_1
%273 = OpIAdd %int %272 %int_1
OpStore %j_1 %273
OpBranch %258
%259 = OpLabel
%274 = OpFunctionCall %void %mergeSort_
%277 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%278 = OpLoad %float %277
%279 = OpConvertFToS %int %278
%281 = OpSLessThan %bool %279 %int_30
OpSelectionMerge %282 None
OpBranchConditional %281 %283 %284
%283 = OpLabel
%285 = OpAccessChain %_ptr_Private_int %data %int_0
%286 = OpLoad %int %285
%288 = OpConvertSToF %float %286
%290 = OpFDiv %float %288 %float_10
%291 = OpFAdd %float %float_0_5 %290
OpStore %grey %291
OpBranch %282
%284 = OpLabel
%292 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%293 = OpLoad %float %292
%294 = OpConvertFToS %int %293
%296 = OpSLessThan %bool %294 %int_60
OpSelectionMerge %297 None
OpBranchConditional %296 %298 %299
%298 = OpLabel
%300 = OpAccessChain %_ptr_Private_int %data %int_1
%301 = OpLoad %int %300
%302 = OpConvertSToF %float %301
%303 = OpFDiv %float %302 %float_10
%304 = OpFAdd %float %float_0_5 %303
OpStore %grey %304
OpBranch %297
%299 = OpLabel
%305 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%306 = OpLoad %float %305
%307 = OpConvertFToS %int %306
%309 = OpSLessThan %bool %307 %int_90
OpSelectionMerge %310 None
OpBranchConditional %309 %311 %312
%311 = OpLabel
%313 = OpAccessChain %_ptr_Private_int %data %int_2
%314 = OpLoad %int %313
%315 = OpConvertSToF %float %314
%316 = OpFDiv %float %315 %float_10
%317 = OpFAdd %float %float_0_5 %316
OpStore %grey %317
OpBranch %310
%312 = OpLabel
%318 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%319 = OpLoad %float %318
%320 = OpConvertFToS %int %319
%322 = OpSLessThan %bool %320 %int_120
OpSelectionMerge %323 None
OpBranchConditional %322 %324 %325
%324 = OpLabel
%326 = OpAccessChain %_ptr_Private_int %data %int_3
%327 = OpLoad %int %326
%328 = OpConvertSToF %float %327
%329 = OpFDiv %float %328 %float_10
%330 = OpFAdd %float %float_0_5 %329
OpStore %grey %330
OpBranch %323
%325 = OpLabel
%331 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%332 = OpLoad %float %331
%333 = OpConvertFToS %int %332
%335 = OpSLessThan %bool %333 %int_150
OpSelectionMerge %336 None
OpBranchConditional %335 %337 %338
%337 = OpLabel
OpKill
%338 = OpLabel
%339 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%340 = OpLoad %float %339
%341 = OpConvertFToS %int %340
%343 = OpSLessThan %bool %341 %int_180
OpSelectionMerge %344 None
OpBranchConditional %343 %345 %346
%345 = OpLabel
%348 = OpAccessChain %_ptr_Private_int %data %int_5
%349 = OpLoad %int %348
%350 = OpConvertSToF %float %349
%351 = OpFDiv %float %350 %float_10
%352 = OpFAdd %float %float_0_5 %351
OpStore %grey %352
OpBranch %344
%346 = OpLabel
%353 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%354 = OpLoad %float %353
%355 = OpConvertFToS %int %354
%357 = OpSLessThan %bool %355 %int_210
OpSelectionMerge %358 None
OpBranchConditional %357 %359 %360
%359 = OpLabel
%362 = OpAccessChain %_ptr_Private_int %data %int_6
%363 = OpLoad %int %362
%364 = OpConvertSToF %float %363
%365 = OpFDiv %float %364 %float_10
%366 = OpFAdd %float %float_0_5 %365
OpStore %grey %366
OpBranch %358
%360 = OpLabel
%367 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%368 = OpLoad %float %367
%369 = OpConvertFToS %int %368
%371 = OpSLessThan %bool %369 %int_240
OpSelectionMerge %372 None
OpBranchConditional %371 %373 %374
%373 = OpLabel
%376 = OpAccessChain %_ptr_Private_int %data %int_7
%377 = OpLoad %int %376
%378 = OpConvertSToF %float %377
%379 = OpFDiv %float %378 %float_10
%380 = OpFAdd %float %float_0_5 %379
OpStore %grey %380
OpBranch %372
%374 = OpLabel
%381 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%382 = OpLoad %float %381
%383 = OpConvertFToS %int %382
%385 = OpSLessThan %bool %383 %int_270
OpSelectionMerge %386 None
OpBranchConditional %385 %387 %388
%387 = OpLabel
%390 = OpAccessChain %_ptr_Private_int %data %int_8
%391 = OpLoad %int %390
%392 = OpConvertSToF %float %391
%393 = OpFDiv %float %392 %float_10
%394 = OpFAdd %float %float_0_5 %393
OpStore %grey %394
OpBranch %386
%388 = OpLabel
OpKill
%386 = OpLabel
OpBranch %372
%372 = OpLabel
OpBranch %358
%358 = OpLabel
OpBranch %344
%344 = OpLabel
OpBranch %336
%336 = OpLabel
OpBranch %323
%323 = OpLabel
OpBranch %310
%310 = OpLabel
OpBranch %297
%297 = OpLabel
OpBranch %282
%282 = OpLabel
%395 = OpLoad %float %grey
%397 = OpCompositeConstruct %v3float %395 %395 %395
%398 = OpCompositeExtract %float %397 0
%399 = OpCompositeExtract %float %397 1
%400 = OpCompositeExtract %float %397 2
%402 = OpCompositeConstruct %v4float %398 %399 %400 %float_1
OpStore %x_GLF_color %402
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %403
%tint_symbol_1 = OpFunctionParameter %main_out
%407 = OpLabel
%408 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %408
OpReturn
OpFunctionEnd
%main = OpFunction %void None %131
%410 = OpLabel
%411 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %411
%412 = OpFunctionCall %void %main_1
%414 = OpLoad %v4float %x_GLF_color
%415 = OpCompositeConstruct %main_out %414
%413 = OpFunctionCall %void %tint_symbol_3 %415
OpReturn
OpFunctionEnd