1 OpCapability Shader 2 %1 = OpExtInstImport "GLSL.std.450" 3 OpMemoryModel Logical GLSL450 4 OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor 5 OpExecutionMode %_entrypoint_v OriginUpperLeft 6 OpName %sk_FragColor "sk_FragColor" 7 OpName %_UniformBuffer "_UniformBuffer" 8 OpMemberName %_UniformBuffer 0 "colorGreen" 9 OpMemberName %_UniformBuffer 1 "colorRed" 10 OpName %_entrypoint_v "_entrypoint_v" 11 OpName %return_in_one_case_bi "return_in_one_case_bi" 12 OpName %val "val" 13 OpName %return_in_default_bi "return_in_default_bi" 14 OpName %return_in_every_case_bi "return_in_every_case_bi" 15 OpName %return_in_every_case_no_default_bi "return_in_every_case_no_default_bi" 16 OpName %val_0 "val" 17 OpName %case_has_break_before_return_bi "case_has_break_before_return_bi" 18 OpName %val_1 "val" 19 OpName %case_has_break_after_return_bi "case_has_break_after_return_bi" 20 OpName %no_return_in_default_bi "no_return_in_default_bi" 21 OpName %val_2 "val" 22 OpName %empty_default_bi "empty_default_bi" 23 OpName %val_3 "val" 24 OpName %return_with_fallthrough_bi "return_with_fallthrough_bi" 25 OpName %fallthrough_ends_in_break_bi "fallthrough_ends_in_break_bi" 26 OpName %val_4 "val" 27 OpName %fallthrough_to_default_with_break_bi "fallthrough_to_default_with_break_bi" 28 OpName %val_5 "val" 29 OpName %fallthrough_to_default_with_return_bi "fallthrough_to_default_with_return_bi" 30 OpName %fallthrough_with_loop_break_bi "fallthrough_with_loop_break_bi" 31 OpName %val_6 "val" 32 OpName %i "i" 33 OpName %fallthrough_with_loop_continue_bi "fallthrough_with_loop_continue_bi" 34 OpName %val_7 "val" 35 OpName %i_0 "i" 36 OpName %main "main" 37 OpName %x "x" 38 OpDecorate %sk_FragColor RelaxedPrecision 39 OpDecorate %sk_FragColor Location 0 40 OpDecorate %sk_FragColor Index 0 41 OpMemberDecorate %_UniformBuffer 0 Offset 0 42 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision 43 OpMemberDecorate %_UniformBuffer 1 Offset 16 44 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision 45 OpDecorate %_UniformBuffer Block 46 OpDecorate %21 Binding 0 47 OpDecorate %21 DescriptorSet 0 48 OpDecorate %192 RelaxedPrecision 49 OpDecorate %193 RelaxedPrecision 50 OpDecorate %268 RelaxedPrecision 51 OpDecorate %270 RelaxedPrecision 52 OpDecorate %271 RelaxedPrecision 53 %float = OpTypeFloat 32 54 %v4float = OpTypeVector %float 4 55%_ptr_Output_v4float = OpTypePointer Output %v4float 56%sk_FragColor = OpVariable %_ptr_Output_v4float Output 57%_UniformBuffer = OpTypeStruct %v4float %v4float 58%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer 59 %21 = OpVariable %_ptr_Uniform__UniformBuffer Uniform 60 %void = OpTypeVoid 61 %26 = OpTypeFunction %void 62 %float_0 = OpConstant %float 0 63 %v2float = OpTypeVector %float 2 64 %30 = OpConstantComposite %v2float %float_0 %float_0 65%_ptr_Function_v2float = OpTypePointer Function %v2float 66 %bool = OpTypeBool 67 %int = OpTypeInt 32 1 68%_ptr_Function_int = OpTypePointer Function %int 69 %37 = OpTypeFunction %bool %_ptr_Function_int 70 %int_0 = OpConstant %int 0 71 %int_1 = OpConstant %int 1 72 %false = OpConstantFalse %bool 73 %true = OpConstantTrue %bool 74 %int_5 = OpConstant %int 5 75 %186 = OpTypeFunction %v4float %_ptr_Function_v2float 76%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float 77%_ptr_Function_v4float = OpTypePointer Function %v4float 78%_entrypoint_v = OpFunction %void None %26 79 %27 = OpLabel 80 %31 = OpVariable %_ptr_Function_v2float Function 81 OpStore %31 %30 82 %33 = OpFunctionCall %v4float %main %31 83 OpStore %sk_FragColor %33 84 OpReturn 85 OpFunctionEnd 86%return_in_one_case_bi = OpFunction %bool None %37 87 %38 = OpFunctionParameter %_ptr_Function_int 88 %39 = OpLabel 89 %val = OpVariable %_ptr_Function_int Function 90 OpStore %val %int_0 91 %42 = OpLoad %int %38 92 OpSelectionMerge %43 None 93 OpSwitch %42 %45 1 %44 94 %44 = OpLabel 95 %47 = OpIAdd %int %int_0 %int_1 96 OpStore %val %47 97 OpReturnValue %false 98 %45 = OpLabel 99 %49 = OpLoad %int %val 100 %50 = OpIAdd %int %49 %int_1 101 OpStore %val %50 102 OpBranch %43 103 %43 = OpLabel 104 %51 = OpLoad %int %val 105 %52 = OpIEqual %bool %51 %int_1 106 OpReturnValue %52 107 OpFunctionEnd 108%return_in_default_bi = OpFunction %bool None %37 109 %53 = OpFunctionParameter %_ptr_Function_int 110 %54 = OpLabel 111 %55 = OpLoad %int %53 112 OpSelectionMerge %56 None 113 OpSwitch %55 %57 114 %57 = OpLabel 115 OpReturnValue %true 116 %56 = OpLabel 117 OpUnreachable 118 OpFunctionEnd 119%return_in_every_case_bi = OpFunction %bool None %37 120 %59 = OpFunctionParameter %_ptr_Function_int 121 %60 = OpLabel 122 %61 = OpLoad %int %59 123 OpSelectionMerge %62 None 124 OpSwitch %61 %64 1 %63 125 %63 = OpLabel 126 OpReturnValue %false 127 %64 = OpLabel 128 OpReturnValue %true 129 %62 = OpLabel 130 OpUnreachable 131 OpFunctionEnd 132%return_in_every_case_no_default_bi = OpFunction %bool None %37 133 %65 = OpFunctionParameter %_ptr_Function_int 134 %66 = OpLabel 135 %val_0 = OpVariable %_ptr_Function_int Function 136 OpStore %val_0 %int_0 137 %68 = OpLoad %int %65 138 OpSelectionMerge %69 None 139 OpSwitch %68 %69 1 %70 2 %71 140 %70 = OpLabel 141 OpReturnValue %false 142 %71 = OpLabel 143 OpReturnValue %true 144 %69 = OpLabel 145 %72 = OpIAdd %int %int_0 %int_1 146 OpStore %val_0 %72 147 %73 = OpIEqual %bool %72 %int_1 148 OpReturnValue %73 149 OpFunctionEnd 150%case_has_break_before_return_bi = OpFunction %bool None %37 151 %74 = OpFunctionParameter %_ptr_Function_int 152 %75 = OpLabel 153 %val_1 = OpVariable %_ptr_Function_int Function 154 OpStore %val_1 %int_0 155 %77 = OpLoad %int %74 156 OpSelectionMerge %78 None 157 OpSwitch %77 %81 1 %79 2 %80 158 %79 = OpLabel 159 OpBranch %78 160 %80 = OpLabel 161 OpReturnValue %true 162 %81 = OpLabel 163 OpReturnValue %true 164 %78 = OpLabel 165 %82 = OpIAdd %int %int_0 %int_1 166 OpStore %val_1 %82 167 %83 = OpIEqual %bool %82 %int_1 168 OpReturnValue %83 169 OpFunctionEnd 170%case_has_break_after_return_bi = OpFunction %bool None %37 171 %84 = OpFunctionParameter %_ptr_Function_int 172 %85 = OpLabel 173 %86 = OpLoad %int %84 174 OpSelectionMerge %87 None 175 OpSwitch %86 %90 1 %88 2 %89 176 %88 = OpLabel 177 OpReturnValue %false 178 %89 = OpLabel 179 OpReturnValue %true 180 %90 = OpLabel 181 OpReturnValue %true 182 %87 = OpLabel 183 OpUnreachable 184 OpFunctionEnd 185%no_return_in_default_bi = OpFunction %bool None %37 186 %91 = OpFunctionParameter %_ptr_Function_int 187 %92 = OpLabel 188 %val_2 = OpVariable %_ptr_Function_int Function 189 OpStore %val_2 %int_0 190 %94 = OpLoad %int %91 191 OpSelectionMerge %95 None 192 OpSwitch %94 %98 1 %96 2 %97 193 %96 = OpLabel 194 OpReturnValue %false 195 %97 = OpLabel 196 OpReturnValue %true 197 %98 = OpLabel 198 OpBranch %95 199 %95 = OpLabel 200 %99 = OpIAdd %int %int_0 %int_1 201 OpStore %val_2 %99 202 %100 = OpIEqual %bool %99 %int_1 203 OpReturnValue %100 204 OpFunctionEnd 205%empty_default_bi = OpFunction %bool None %37 206 %101 = OpFunctionParameter %_ptr_Function_int 207 %102 = OpLabel 208 %val_3 = OpVariable %_ptr_Function_int Function 209 OpStore %val_3 %int_0 210 %104 = OpLoad %int %101 211 OpSelectionMerge %105 None 212 OpSwitch %104 %108 1 %106 2 %107 213 %106 = OpLabel 214 OpReturnValue %false 215 %107 = OpLabel 216 OpReturnValue %true 217 %108 = OpLabel 218 OpBranch %105 219 %105 = OpLabel 220 %109 = OpIAdd %int %int_0 %int_1 221 OpStore %val_3 %109 222 %110 = OpIEqual %bool %109 %int_1 223 OpReturnValue %110 224 OpFunctionEnd 225%return_with_fallthrough_bi = OpFunction %bool None %37 226 %111 = OpFunctionParameter %_ptr_Function_int 227 %112 = OpLabel 228 %113 = OpLoad %int %111 229 OpSelectionMerge %114 None 230 OpSwitch %113 %117 1 %116 2 %116 231 %116 = OpLabel 232 OpReturnValue %true 233 %117 = OpLabel 234 OpReturnValue %false 235 %114 = OpLabel 236 OpUnreachable 237 OpFunctionEnd 238%fallthrough_ends_in_break_bi = OpFunction %bool None %37 239 %118 = OpFunctionParameter %_ptr_Function_int 240 %119 = OpLabel 241 %val_4 = OpVariable %_ptr_Function_int Function 242 OpStore %val_4 %int_0 243 %121 = OpLoad %int %118 244 OpSelectionMerge %122 None 245 OpSwitch %121 %125 1 %124 2 %124 246 %124 = OpLabel 247 OpBranch %122 248 %125 = OpLabel 249 OpReturnValue %false 250 %122 = OpLabel 251 %126 = OpIAdd %int %int_0 %int_1 252 OpStore %val_4 %126 253 %127 = OpIEqual %bool %126 %int_1 254 OpReturnValue %127 255 OpFunctionEnd 256%fallthrough_to_default_with_break_bi = OpFunction %bool None %37 257 %128 = OpFunctionParameter %_ptr_Function_int 258 %129 = OpLabel 259 %val_5 = OpVariable %_ptr_Function_int Function 260 OpStore %val_5 %int_0 261 %131 = OpLoad %int %128 262 OpSelectionMerge %132 None 263 OpSwitch %131 %135 1 %135 2 %135 264 %135 = OpLabel 265 OpBranch %132 266 %132 = OpLabel 267 %136 = OpIAdd %int %int_0 %int_1 268 OpStore %val_5 %136 269 %137 = OpIEqual %bool %136 %int_1 270 OpReturnValue %137 271 OpFunctionEnd 272%fallthrough_to_default_with_return_bi = OpFunction %bool None %37 273 %138 = OpFunctionParameter %_ptr_Function_int 274 %139 = OpLabel 275 %140 = OpLoad %int %138 276 OpSelectionMerge %141 None 277 OpSwitch %140 %144 1 %144 2 %144 278 %144 = OpLabel 279 OpReturnValue %true 280 %141 = OpLabel 281 OpUnreachable 282 OpFunctionEnd 283%fallthrough_with_loop_break_bi = OpFunction %bool None %37 284 %145 = OpFunctionParameter %_ptr_Function_int 285 %146 = OpLabel 286 %val_6 = OpVariable %_ptr_Function_int Function 287 %i = OpVariable %_ptr_Function_int Function 288 OpStore %val_6 %int_0 289 %148 = OpLoad %int %145 290 OpSelectionMerge %149 None 291 OpSwitch %148 %152 1 %150 2 %152 292 %150 = OpLabel 293 OpStore %i %int_0 294 OpBranch %154 295 %154 = OpLabel 296 OpLoopMerge %158 %157 None 297 OpBranch %155 298 %155 = OpLabel 299 %159 = OpLoad %int %i 300 %161 = OpSLessThan %bool %159 %int_5 301 OpBranchConditional %161 %156 %158 302 %156 = OpLabel 303 %162 = OpLoad %int %val_6 304 %163 = OpIAdd %int %162 %int_1 305 OpStore %val_6 %163 306 OpBranch %158 307 %157 = OpLabel 308 %164 = OpLoad %int %i 309 %165 = OpIAdd %int %164 %int_1 310 OpStore %i %165 311 OpBranch %154 312 %158 = OpLabel 313 OpBranch %152 314 %152 = OpLabel 315 OpReturnValue %true 316 %149 = OpLabel 317 OpUnreachable 318 OpFunctionEnd 319%fallthrough_with_loop_continue_bi = OpFunction %bool None %37 320 %166 = OpFunctionParameter %_ptr_Function_int 321 %167 = OpLabel 322 %val_7 = OpVariable %_ptr_Function_int Function 323 %i_0 = OpVariable %_ptr_Function_int Function 324 OpStore %val_7 %int_0 325 %169 = OpLoad %int %166 326 OpSelectionMerge %170 None 327 OpSwitch %169 %173 1 %171 2 %173 328 %171 = OpLabel 329 OpStore %i_0 %int_0 330 OpBranch %175 331 %175 = OpLabel 332 OpLoopMerge %179 %178 None 333 OpBranch %176 334 %176 = OpLabel 335 %180 = OpLoad %int %i_0 336 %181 = OpSLessThan %bool %180 %int_5 337 OpBranchConditional %181 %177 %179 338 %177 = OpLabel 339 %182 = OpLoad %int %val_7 340 %183 = OpIAdd %int %182 %int_1 341 OpStore %val_7 %183 342 OpBranch %178 343 %178 = OpLabel 344 %184 = OpLoad %int %i_0 345 %185 = OpIAdd %int %184 %int_1 346 OpStore %i_0 %185 347 OpBranch %175 348 %179 = OpLabel 349 OpBranch %173 350 %173 = OpLabel 351 OpReturnValue %true 352 %170 = OpLabel 353 OpUnreachable 354 OpFunctionEnd 355 %main = OpFunction %v4float None %186 356 %187 = OpFunctionParameter %_ptr_Function_v2float 357 %188 = OpLabel 358 %x = OpVariable %_ptr_Function_int Function 359 %195 = OpVariable %_ptr_Function_int Function 360 %199 = OpVariable %_ptr_Function_int Function 361 %204 = OpVariable %_ptr_Function_int Function 362 %209 = OpVariable %_ptr_Function_int Function 363 %214 = OpVariable %_ptr_Function_int Function 364 %219 = OpVariable %_ptr_Function_int Function 365 %224 = OpVariable %_ptr_Function_int Function 366 %229 = OpVariable %_ptr_Function_int Function 367 %234 = OpVariable %_ptr_Function_int Function 368 %239 = OpVariable %_ptr_Function_int Function 369 %244 = OpVariable %_ptr_Function_int Function 370 %249 = OpVariable %_ptr_Function_int Function 371 %254 = OpVariable %_ptr_Function_int Function 372 %259 = OpVariable %_ptr_Function_int Function 373 %262 = OpVariable %_ptr_Function_v4float Function 374 %190 = OpAccessChain %_ptr_Uniform_v4float %21 %int_0 375 %192 = OpLoad %v4float %190 376 %193 = OpCompositeExtract %float %192 1 377 %194 = OpConvertFToS %int %193 378 OpStore %x %194 379 OpStore %195 %194 380 %196 = OpFunctionCall %bool %return_in_one_case_bi %195 381 OpSelectionMerge %198 None 382 OpBranchConditional %196 %197 %198 383 %197 = OpLabel 384 OpStore %199 %194 385 %200 = OpFunctionCall %bool %return_in_default_bi %199 386 OpBranch %198 387 %198 = OpLabel 388 %201 = OpPhi %bool %false %188 %200 %197 389 OpSelectionMerge %203 None 390 OpBranchConditional %201 %202 %203 391 %202 = OpLabel 392 OpStore %204 %194 393 %205 = OpFunctionCall %bool %return_in_every_case_bi %204 394 OpBranch %203 395 %203 = OpLabel 396 %206 = OpPhi %bool %false %198 %205 %202 397 OpSelectionMerge %208 None 398 OpBranchConditional %206 %207 %208 399 %207 = OpLabel 400 OpStore %209 %194 401 %210 = OpFunctionCall %bool %return_in_every_case_no_default_bi %209 402 OpBranch %208 403 %208 = OpLabel 404 %211 = OpPhi %bool %false %203 %210 %207 405 OpSelectionMerge %213 None 406 OpBranchConditional %211 %212 %213 407 %212 = OpLabel 408 OpStore %214 %194 409 %215 = OpFunctionCall %bool %case_has_break_before_return_bi %214 410 OpBranch %213 411 %213 = OpLabel 412 %216 = OpPhi %bool %false %208 %215 %212 413 OpSelectionMerge %218 None 414 OpBranchConditional %216 %217 %218 415 %217 = OpLabel 416 OpStore %219 %194 417 %220 = OpFunctionCall %bool %case_has_break_after_return_bi %219 418 OpBranch %218 419 %218 = OpLabel 420 %221 = OpPhi %bool %false %213 %220 %217 421 OpSelectionMerge %223 None 422 OpBranchConditional %221 %222 %223 423 %222 = OpLabel 424 OpStore %224 %194 425 %225 = OpFunctionCall %bool %no_return_in_default_bi %224 426 OpBranch %223 427 %223 = OpLabel 428 %226 = OpPhi %bool %false %218 %225 %222 429 OpSelectionMerge %228 None 430 OpBranchConditional %226 %227 %228 431 %227 = OpLabel 432 OpStore %229 %194 433 %230 = OpFunctionCall %bool %empty_default_bi %229 434 OpBranch %228 435 %228 = OpLabel 436 %231 = OpPhi %bool %false %223 %230 %227 437 OpSelectionMerge %233 None 438 OpBranchConditional %231 %232 %233 439 %232 = OpLabel 440 OpStore %234 %194 441 %235 = OpFunctionCall %bool %return_with_fallthrough_bi %234 442 OpBranch %233 443 %233 = OpLabel 444 %236 = OpPhi %bool %false %228 %235 %232 445 OpSelectionMerge %238 None 446 OpBranchConditional %236 %237 %238 447 %237 = OpLabel 448 OpStore %239 %194 449 %240 = OpFunctionCall %bool %fallthrough_ends_in_break_bi %239 450 OpBranch %238 451 %238 = OpLabel 452 %241 = OpPhi %bool %false %233 %240 %237 453 OpSelectionMerge %243 None 454 OpBranchConditional %241 %242 %243 455 %242 = OpLabel 456 OpStore %244 %194 457 %245 = OpFunctionCall %bool %fallthrough_to_default_with_break_bi %244 458 OpBranch %243 459 %243 = OpLabel 460 %246 = OpPhi %bool %false %238 %245 %242 461 OpSelectionMerge %248 None 462 OpBranchConditional %246 %247 %248 463 %247 = OpLabel 464 OpStore %249 %194 465 %250 = OpFunctionCall %bool %fallthrough_to_default_with_return_bi %249 466 OpBranch %248 467 %248 = OpLabel 468 %251 = OpPhi %bool %false %243 %250 %247 469 OpSelectionMerge %253 None 470 OpBranchConditional %251 %252 %253 471 %252 = OpLabel 472 OpStore %254 %194 473 %255 = OpFunctionCall %bool %fallthrough_with_loop_break_bi %254 474 OpBranch %253 475 %253 = OpLabel 476 %256 = OpPhi %bool %false %248 %255 %252 477 OpSelectionMerge %258 None 478 OpBranchConditional %256 %257 %258 479 %257 = OpLabel 480 OpStore %259 %194 481 %260 = OpFunctionCall %bool %fallthrough_with_loop_continue_bi %259 482 OpBranch %258 483 %258 = OpLabel 484 %261 = OpPhi %bool %false %253 %260 %257 485 OpSelectionMerge %266 None 486 OpBranchConditional %261 %264 %265 487 %264 = OpLabel 488 %267 = OpAccessChain %_ptr_Uniform_v4float %21 %int_0 489 %268 = OpLoad %v4float %267 490 OpStore %262 %268 491 OpBranch %266 492 %265 = OpLabel 493 %269 = OpAccessChain %_ptr_Uniform_v4float %21 %int_1 494 %270 = OpLoad %v4float %269 495 OpStore %262 %270 496 OpBranch %266 497 %266 = OpLabel 498 %271 = OpLoad %v4float %262 499 OpReturnValue %271 500 OpFunctionEnd 501