| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 6 |
| 4 |
; Bound: 28 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
%1 = OpExtInstImport "GLSL.std.450" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint Fragment %main "main" %vIndex %FragColor |
| 10 |
OpExecutionMode %main OriginUpperLeft |
| 11 |
OpSource ESSL 310 |
| 12 |
OpName %main "main" |
| 13 |
OpName %vIndex "vIndex" |
| 14 |
OpName %FragColor "FragColor" |
| 15 |
OpDecorate %vIndex RelaxedPrecision |
| 16 |
OpDecorate %vIndex Flat |
| 17 |
OpDecorate %vIndex Location 0 |
| 18 |
OpDecorate %13 RelaxedPrecision |
| 19 |
OpDecorate %FragColor RelaxedPrecision |
| 20 |
OpDecorate %FragColor Location 0 |
| 21 |
%void = OpTypeVoid |
| 22 |
%3 = OpTypeFunction %void |
| 23 |
%float = OpTypeFloat 32 |
| 24 |
%float_8 = OpConstant %float 8 |
| 25 |
%int = OpTypeInt 32 1 |
| 26 |
%_ptr_Input_int = OpTypePointer Input %int |
| 27 |
%vIndex = OpVariable %_ptr_Input_int Input |
| 28 |
%float_1 = OpConstant %float 1 |
| 29 |
%float_3 = OpConstant %float 3 |
| 30 |
%_ptr_Output_float = OpTypePointer Output %float |
| 31 |
%FragColor = OpVariable %_ptr_Output_float Output |
| 32 |
%main = OpFunction %void None %3 |
| 33 |
%5 = OpLabel |
| 34 |
%13 = OpLoad %int %vIndex |
| 35 |
OpSelectionMerge %17 None |
| 36 |
OpSwitch %13 %15 0 %14 2 %14 1 %15 8 %17 |
| 37 |
%15 = OpLabel |
| 38 |
OpBranch %17 |
| 39 |
%14 = OpLabel |
| 40 |
OpBranch %17 |
| 41 |
%17 = OpLabel |
| 42 |
%27 = OpPhi %float %float_3 %15 %float_1 %14 %float_8 %5 |
| 43 |
OpStore %FragColor %27 |
| 44 |
OpReturn |
| 45 |
OpFunctionEnd |