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 OpMemberName %_UniformBuffer 2 "unknownInput" 11 OpName %_entrypoint_v "_entrypoint_v" 12 OpName %inside_while_loop_b "inside_while_loop_b" 13 OpName %inside_infinite_do_loop_b "inside_infinite_do_loop_b" 14 OpName %inside_infinite_while_loop_b "inside_infinite_while_loop_b" 15 OpName %after_do_loop_b "after_do_loop_b" 16 OpName %after_while_loop_b "after_while_loop_b" 17 OpName %switch_with_all_returns_b "switch_with_all_returns_b" 18 OpName %switch_fallthrough_b "switch_fallthrough_b" 19 OpName %switch_fallthrough_twice_b "switch_fallthrough_twice_b" 20 OpName %switch_with_break_in_loop_b "switch_with_break_in_loop_b" 21 OpName %x "x" 22 OpName %switch_with_continue_in_loop_b "switch_with_continue_in_loop_b" 23 OpName %x_0 "x" 24 OpName %switch_with_if_that_returns_b "switch_with_if_that_returns_b" 25 OpName %switch_with_one_sided_if_then_fallthrough_b "switch_with_one_sided_if_then_fallthrough_b" 26 OpName %main "main" 27 OpDecorate %sk_FragColor RelaxedPrecision 28 OpDecorate %sk_FragColor Location 0 29 OpDecorate %sk_FragColor Index 0 30 OpMemberDecorate %_UniformBuffer 0 Offset 0 31 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision 32 OpMemberDecorate %_UniformBuffer 1 Offset 16 33 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision 34 OpMemberDecorate %_UniformBuffer 2 Offset 32 35 OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision 36 OpDecorate %_UniformBuffer Block 37 OpDecorate %19 Binding 0 38 OpDecorate %19 DescriptorSet 0 39 OpDecorate %44 RelaxedPrecision 40 OpDecorate %75 RelaxedPrecision 41 OpDecorate %83 RelaxedPrecision 42 OpDecorate %91 RelaxedPrecision 43 OpDecorate %99 RelaxedPrecision 44 OpDecorate %120 RelaxedPrecision 45 OpDecorate %137 RelaxedPrecision 46 OpDecorate %143 RelaxedPrecision 47 OpDecorate %150 RelaxedPrecision 48 OpDecorate %156 RelaxedPrecision 49 OpDecorate %215 RelaxedPrecision 50 OpDecorate %217 RelaxedPrecision 51 OpDecorate %218 RelaxedPrecision 52 %float = OpTypeFloat 32 53 %v4float = OpTypeVector %float 4 54%_ptr_Output_v4float = OpTypePointer Output %v4float 55%sk_FragColor = OpVariable %_ptr_Output_v4float Output 56%_UniformBuffer = OpTypeStruct %v4float %v4float %float 57%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer 58 %19 = OpVariable %_ptr_Uniform__UniformBuffer Uniform 59 %void = OpTypeVoid 60 %24 = OpTypeFunction %void 61 %float_0 = OpConstant %float 0 62 %v2float = OpTypeVector %float 2 63 %28 = OpConstantComposite %v2float %float_0 %float_0 64%_ptr_Function_v2float = OpTypePointer Function %v2float 65 %bool = OpTypeBool 66 %33 = OpTypeFunction %bool 67%_ptr_Uniform_float = OpTypePointer Uniform %float 68 %int = OpTypeInt 32 1 69 %int_2 = OpConstant %int 2 70 %float_123 = OpConstant %float 123 71 %false = OpConstantFalse %bool 72 %true = OpConstantTrue %bool 73%_ptr_Function_int = OpTypePointer Function %int 74 %int_0 = OpConstant %int 0 75 %int_10 = OpConstant %int 10 76 %int_1 = OpConstant %int 1 77 %160 = OpTypeFunction %v4float %_ptr_Function_v2float 78%_ptr_Function_v4float = OpTypePointer Function %v4float 79%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float 80%_entrypoint_v = OpFunction %void None %24 81 %25 = OpLabel 82 %29 = OpVariable %_ptr_Function_v2float Function 83 OpStore %29 %28 84 %31 = OpFunctionCall %v4float %main %29 85 OpStore %sk_FragColor %31 86 OpReturn 87 OpFunctionEnd 88%inside_while_loop_b = OpFunction %bool None %33 89 %34 = OpLabel 90 OpBranch %35 91 %35 = OpLabel 92 OpLoopMerge %39 %38 None 93 OpBranch %36 94 %36 = OpLabel 95 %40 = OpAccessChain %_ptr_Uniform_float %19 %int_2 96 %44 = OpLoad %float %40 97 %46 = OpFOrdEqual %bool %44 %float_123 98 OpBranchConditional %46 %37 %39 99 %37 = OpLabel 100 OpReturnValue %false 101 %38 = OpLabel 102 OpBranch %35 103 %39 = OpLabel 104 OpReturnValue %true 105 OpFunctionEnd 106%inside_infinite_do_loop_b = OpFunction %bool None %33 107 %49 = OpLabel 108 OpBranch %50 109 %50 = OpLabel 110 OpLoopMerge %54 %53 None 111 OpBranch %51 112 %51 = OpLabel 113 OpReturnValue %true 114 %53 = OpLabel 115 OpBranchConditional %true %50 %54 116 %54 = OpLabel 117 OpUnreachable 118 OpFunctionEnd 119%inside_infinite_while_loop_b = OpFunction %bool None %33 120 %55 = OpLabel 121 OpBranch %56 122 %56 = OpLabel 123 OpLoopMerge %60 %59 None 124 OpBranch %57 125 %57 = OpLabel 126 OpBranchConditional %true %58 %60 127 %58 = OpLabel 128 OpReturnValue %true 129 %59 = OpLabel 130 OpBranch %56 131 %60 = OpLabel 132 OpUnreachable 133 OpFunctionEnd 134%after_do_loop_b = OpFunction %bool None %33 135 %61 = OpLabel 136 OpBranch %62 137 %62 = OpLabel 138 OpLoopMerge %66 %65 None 139 OpBranch %63 140 %63 = OpLabel 141 OpBranch %66 142 %65 = OpLabel 143 OpBranchConditional %true %62 %66 144 %66 = OpLabel 145 OpReturnValue %true 146 OpFunctionEnd 147%after_while_loop_b = OpFunction %bool None %33 148 %67 = OpLabel 149 OpBranch %68 150 %68 = OpLabel 151 OpLoopMerge %72 %71 None 152 OpBranch %69 153 %69 = OpLabel 154 OpBranchConditional %true %70 %72 155 %70 = OpLabel 156 OpBranch %72 157 %71 = OpLabel 158 OpBranch %68 159 %72 = OpLabel 160 OpReturnValue %true 161 OpFunctionEnd 162%switch_with_all_returns_b = OpFunction %bool None %33 163 %73 = OpLabel 164 %74 = OpAccessChain %_ptr_Uniform_float %19 %int_2 165 %75 = OpLoad %float %74 166 %76 = OpConvertFToS %int %75 167 OpSelectionMerge %77 None 168 OpSwitch %76 %80 1 %78 2 %79 169 %78 = OpLabel 170 OpReturnValue %true 171 %79 = OpLabel 172 OpReturnValue %false 173 %80 = OpLabel 174 OpReturnValue %false 175 %77 = OpLabel 176 OpUnreachable 177 OpFunctionEnd 178%switch_fallthrough_b = OpFunction %bool None %33 179 %81 = OpLabel 180 %82 = OpAccessChain %_ptr_Uniform_float %19 %int_2 181 %83 = OpLoad %float %82 182 %84 = OpConvertFToS %int %83 183 OpSelectionMerge %85 None 184 OpSwitch %84 %88 1 %86 2 %88 185 %86 = OpLabel 186 OpReturnValue %true 187 %88 = OpLabel 188 OpReturnValue %false 189 %85 = OpLabel 190 OpUnreachable 191 OpFunctionEnd 192%switch_fallthrough_twice_b = OpFunction %bool None %33 193 %89 = OpLabel 194 %90 = OpAccessChain %_ptr_Uniform_float %19 %int_2 195 %91 = OpLoad %float %90 196 %92 = OpConvertFToS %int %91 197 OpSelectionMerge %93 None 198 OpSwitch %92 %96 1 %96 2 %96 199 %96 = OpLabel 200 OpReturnValue %true 201 %93 = OpLabel 202 OpUnreachable 203 OpFunctionEnd 204%switch_with_break_in_loop_b = OpFunction %bool None %33 205 %97 = OpLabel 206 %x = OpVariable %_ptr_Function_int Function 207 %98 = OpAccessChain %_ptr_Uniform_float %19 %int_2 208 %99 = OpLoad %float %98 209 %100 = OpConvertFToS %int %99 210 OpSelectionMerge %101 None 211 OpSwitch %100 %103 1 %102 212 %102 = OpLabel 213 OpStore %x %int_0 214 OpBranch %107 215 %107 = OpLabel 216 OpLoopMerge %111 %110 None 217 OpBranch %108 218 %108 = OpLabel 219 %112 = OpLoad %int %x 220 %114 = OpSLessThanEqual %bool %112 %int_10 221 OpBranchConditional %114 %109 %111 222 %109 = OpLabel 223 OpBranch %111 224 %110 = OpLabel 225 %116 = OpLoad %int %x 226 %117 = OpIAdd %int %116 %int_1 227 OpStore %x %117 228 OpBranch %107 229 %111 = OpLabel 230 OpBranch %103 231 %103 = OpLabel 232 OpReturnValue %true 233 %101 = OpLabel 234 OpUnreachable 235 OpFunctionEnd 236%switch_with_continue_in_loop_b = OpFunction %bool None %33 237 %118 = OpLabel 238 %x_0 = OpVariable %_ptr_Function_int Function 239 %119 = OpAccessChain %_ptr_Uniform_float %19 %int_2 240 %120 = OpLoad %float %119 241 %121 = OpConvertFToS %int %120 242 OpSelectionMerge %122 None 243 OpSwitch %121 %124 1 %123 244 %123 = OpLabel 245 OpStore %x_0 %int_0 246 OpBranch %126 247 %126 = OpLabel 248 OpLoopMerge %130 %129 None 249 OpBranch %127 250 %127 = OpLabel 251 %131 = OpLoad %int %x_0 252 %132 = OpSLessThanEqual %bool %131 %int_10 253 OpBranchConditional %132 %128 %130 254 %128 = OpLabel 255 OpBranch %129 256 %129 = OpLabel 257 %133 = OpLoad %int %x_0 258 %134 = OpIAdd %int %133 %int_1 259 OpStore %x_0 %134 260 OpBranch %126 261 %130 = OpLabel 262 OpBranch %124 263 %124 = OpLabel 264 OpReturnValue %true 265 %122 = OpLabel 266 OpUnreachable 267 OpFunctionEnd 268%switch_with_if_that_returns_b = OpFunction %bool None %33 269 %135 = OpLabel 270 %136 = OpAccessChain %_ptr_Uniform_float %19 %int_2 271 %137 = OpLoad %float %136 272 %138 = OpConvertFToS %int %137 273 OpSelectionMerge %139 None 274 OpSwitch %138 %141 1 %140 275 %140 = OpLabel 276 %142 = OpAccessChain %_ptr_Uniform_float %19 %int_2 277 %143 = OpLoad %float %142 278 %144 = OpFOrdEqual %bool %143 %float_123 279 OpSelectionMerge %147 None 280 OpBranchConditional %144 %145 %146 281 %145 = OpLabel 282 OpReturnValue %false 283 %146 = OpLabel 284 OpReturnValue %true 285 %147 = OpLabel 286 OpBranch %141 287 %141 = OpLabel 288 OpReturnValue %true 289 %139 = OpLabel 290 OpUnreachable 291 OpFunctionEnd 292%switch_with_one_sided_if_then_fallthrough_b = OpFunction %bool None %33 293 %148 = OpLabel 294 %149 = OpAccessChain %_ptr_Uniform_float %19 %int_2 295 %150 = OpLoad %float %149 296 %151 = OpConvertFToS %int %150 297 OpSelectionMerge %152 None 298 OpSwitch %151 %154 1 %153 299 %153 = OpLabel 300 %155 = OpAccessChain %_ptr_Uniform_float %19 %int_2 301 %156 = OpLoad %float %155 302 %157 = OpFOrdEqual %bool %156 %float_123 303 OpSelectionMerge %159 None 304 OpBranchConditional %157 %158 %159 305 %158 = OpLabel 306 OpReturnValue %false 307 %159 = OpLabel 308 OpBranch %154 309 %154 = OpLabel 310 OpReturnValue %true 311 %152 = OpLabel 312 OpUnreachable 313 OpFunctionEnd 314 %main = OpFunction %v4float None %160 315 %161 = OpFunctionParameter %_ptr_Function_v2float 316 %162 = OpLabel 317 %208 = OpVariable %_ptr_Function_v4float Function 318 %163 = OpFunctionCall %bool %inside_while_loop_b 319 OpSelectionMerge %165 None 320 OpBranchConditional %163 %164 %165 321 %164 = OpLabel 322 %166 = OpFunctionCall %bool %inside_infinite_do_loop_b 323 OpBranch %165 324 %165 = OpLabel 325 %167 = OpPhi %bool %false %162 %166 %164 326 OpSelectionMerge %169 None 327 OpBranchConditional %167 %168 %169 328 %168 = OpLabel 329 %170 = OpFunctionCall %bool %inside_infinite_while_loop_b 330 OpBranch %169 331 %169 = OpLabel 332 %171 = OpPhi %bool %false %165 %170 %168 333 OpSelectionMerge %173 None 334 OpBranchConditional %171 %172 %173 335 %172 = OpLabel 336 %174 = OpFunctionCall %bool %after_do_loop_b 337 OpBranch %173 338 %173 = OpLabel 339 %175 = OpPhi %bool %false %169 %174 %172 340 OpSelectionMerge %177 None 341 OpBranchConditional %175 %176 %177 342 %176 = OpLabel 343 %178 = OpFunctionCall %bool %after_while_loop_b 344 OpBranch %177 345 %177 = OpLabel 346 %179 = OpPhi %bool %false %173 %178 %176 347 OpSelectionMerge %181 None 348 OpBranchConditional %179 %180 %181 349 %180 = OpLabel 350 %182 = OpFunctionCall %bool %switch_with_all_returns_b 351 OpBranch %181 352 %181 = OpLabel 353 %183 = OpPhi %bool %false %177 %182 %180 354 OpSelectionMerge %185 None 355 OpBranchConditional %183 %184 %185 356 %184 = OpLabel 357 %186 = OpFunctionCall %bool %switch_fallthrough_b 358 OpBranch %185 359 %185 = OpLabel 360 %187 = OpPhi %bool %false %181 %186 %184 361 OpSelectionMerge %189 None 362 OpBranchConditional %187 %188 %189 363 %188 = OpLabel 364 %190 = OpFunctionCall %bool %switch_fallthrough_twice_b 365 OpBranch %189 366 %189 = OpLabel 367 %191 = OpPhi %bool %false %185 %190 %188 368 OpSelectionMerge %193 None 369 OpBranchConditional %191 %192 %193 370 %192 = OpLabel 371 %194 = OpFunctionCall %bool %switch_with_break_in_loop_b 372 OpBranch %193 373 %193 = OpLabel 374 %195 = OpPhi %bool %false %189 %194 %192 375 OpSelectionMerge %197 None 376 OpBranchConditional %195 %196 %197 377 %196 = OpLabel 378 %198 = OpFunctionCall %bool %switch_with_continue_in_loop_b 379 OpBranch %197 380 %197 = OpLabel 381 %199 = OpPhi %bool %false %193 %198 %196 382 OpSelectionMerge %201 None 383 OpBranchConditional %199 %200 %201 384 %200 = OpLabel 385 %202 = OpFunctionCall %bool %switch_with_if_that_returns_b 386 OpBranch %201 387 %201 = OpLabel 388 %203 = OpPhi %bool %false %197 %202 %200 389 OpSelectionMerge %205 None 390 OpBranchConditional %203 %204 %205 391 %204 = OpLabel 392 %206 = OpFunctionCall %bool %switch_with_one_sided_if_then_fallthrough_b 393 OpBranch %205 394 %205 = OpLabel 395 %207 = OpPhi %bool %false %201 %206 %204 396 OpSelectionMerge %212 None 397 OpBranchConditional %207 %210 %211 398 %210 = OpLabel 399 %213 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 400 %215 = OpLoad %v4float %213 401 OpStore %208 %215 402 OpBranch %212 403 %211 = OpLabel 404 %216 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1 405 %217 = OpLoad %v4float %216 406 OpStore %208 %217 407 OpBranch %212 408 %212 = OpLabel 409 %218 = OpLoad %v4float %208 410 OpReturnValue %218 411 OpFunctionEnd 412