| OpCapability Shader |
| %5 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %sk_FragColor |
| OpExecutionMode %main OriginUpperLeft |
| |
| ; Debug Information |
| OpName %sk_FragColor "sk_FragColor" ; id %7 |
| OpName %main "main" ; id %6 |
| OpName %x "x" ; id %14 |
| |
| ; Annotations |
| OpDecorate %sk_FragColor RelaxedPrecision |
| OpDecorate %sk_FragColor Location 0 |
| OpDecorate %sk_FragColor Index 0 |
| |
| ; Types, variables and constants |
| %int = OpTypeInt 32 1 |
| %_ptr_Input_int = OpTypePointer Input %int |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %sk_FragColor = OpVariable %_ptr_Output_v4float Output ; RelaxedPrecision, Location 0, Index 0 |
| %void = OpTypeVoid |
| %12 = OpTypeFunction %void |
| %_ptr_Function_float = OpTypePointer Function %float |
| %float_0 = OpConstant %float 0 |
| %int_0 = OpConstant %int 0 |
| %float_1 = OpConstant %float 1 |
| %bool = OpTypeBool |
| %26 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
| |
| |
| ; Function main |
| %main = OpFunction %void None %12 |
| |
| %13 = OpLabel |
| %x = OpVariable %_ptr_Function_float Function |
| OpStore %x %float_0 |
| OpSelectionMerge %18 None |
| OpSwitch %int_0 %18 0 %19 1 %20 |
| |
| %19 = OpLabel |
| OpStore %x %float_0 |
| %22 = OpFOrdLessThan %bool %float_0 %float_1 |
| OpSelectionMerge %25 None |
| OpBranchConditional %22 %24 %25 |
| |
| %24 = OpLabel |
| OpStore %sk_FragColor %26 |
| OpBranch %18 |
| |
| %25 = OpLabel |
| OpBranch %20 |
| |
| %20 = OpLabel |
| OpStore %x %float_1 |
| OpBranch %18 |
| |
| %18 = OpLabel |
| OpReturn |
| OpFunctionEnd |