| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 8 |
| 4 |
; Bound: 65 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
%1 = OpExtInstImport "GLSL.std.450" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint Fragment %main "main" %FragColor %vA %vB |
| 10 |
OpExecutionMode %main OriginUpperLeft |
| 11 |
OpSource ESSL 310 |
| 12 |
OpName %main "main" |
| 13 |
OpName %FragColor "FragColor" |
| 14 |
OpName %vA "vA" |
| 15 |
OpName %vB "vB" |
| 16 |
OpDecorate %FragColor RelaxedPrecision |
| 17 |
OpDecorate %FragColor Location 0 |
| 18 |
OpDecorate %vA RelaxedPrecision |
| 19 |
OpDecorate %vA Flat |
| 20 |
OpDecorate %vA Location 0 |
| 21 |
OpDecorate %25 RelaxedPrecision |
| 22 |
OpDecorate %30 RelaxedPrecision |
| 23 |
OpDecorate %vB RelaxedPrecision |
| 24 |
OpDecorate %vB Flat |
| 25 |
OpDecorate %vB Location 1 |
| 26 |
OpDecorate %38 RelaxedPrecision |
| 27 |
OpDecorate %40 RelaxedPrecision |
| 28 |
OpDecorate %49 RelaxedPrecision |
| 29 |
OpDecorate %51 RelaxedPrecision |
| 30 |
OpDecorate %53 RelaxedPrecision |
| 31 |
OpDecorate %56 RelaxedPrecision |
| 32 |
OpDecorate %64 RelaxedPrecision |
| 33 |
OpDecorate %58 RelaxedPrecision |
| 34 |
OpDecorate %57 RelaxedPrecision |
| 35 |
OpDecorate %60 RelaxedPrecision |
| 36 |
%void = OpTypeVoid |
| 37 |
%3 = OpTypeFunction %void |
| 38 |
%float = OpTypeFloat 32 |
| 39 |
%v4float = OpTypeVector %float 4 |
| 40 |
%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 41 |
%FragColor = OpVariable %_ptr_Output_v4float Output |
| 42 |
%float_0 = OpConstant %float 0 |
| 43 |
%11 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
| 44 |
%int = OpTypeInt 32 1 |
| 45 |
%int_0 = OpConstant %int 0 |
| 46 |
%_ptr_Input_int = OpTypePointer Input %int |
| 47 |
%vA = OpVariable %_ptr_Input_int Input |
| 48 |
%bool = OpTypeBool |
| 49 |
%int_20 = OpConstant %int 20 |
| 50 |
%int_50 = OpConstant %int 50 |
| 51 |
%vB = OpVariable %_ptr_Input_int Input |
| 52 |
%int_40 = OpConstant %int 40 |
| 53 |
%int_60 = OpConstant %int 60 |
| 54 |
%int_10 = OpConstant %int 10 |
| 55 |
%float_1 = OpConstant %float 1 |
| 56 |
%63 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 |
| 57 |
%main = OpFunction %void None %3 |
| 58 |
%5 = OpLabel |
| 59 |
OpStore %FragColor %11 |
| 60 |
OpBranch %17 |
| 61 |
%17 = OpLabel |
| 62 |
%60 = OpPhi %int %int_0 %5 %58 %20 |
| 63 |
%57 = OpPhi %int %int_0 %5 %56 %20 |
| 64 |
%25 = OpLoad %int %vA |
| 65 |
%27 = OpSLessThan %bool %57 %25 |
| 66 |
OpLoopMerge %19 %20 None |
| 67 |
OpBranchConditional %27 %18 %19 |
| 68 |
%18 = OpLabel |
| 69 |
%30 = OpIAdd %int %25 %57 |
| 70 |
%32 = OpIEqual %bool %30 %int_20 |
| 71 |
OpSelectionMerge %34 None |
| 72 |
OpBranchConditional %32 %33 %36 |
| 73 |
%33 = OpLabel |
| 74 |
OpBranch %34 |
| 75 |
%36 = OpLabel |
| 76 |
%38 = OpLoad %int %vB |
| 77 |
%40 = OpIAdd %int %38 %57 |
| 78 |
%42 = OpIEqual %bool %40 %int_40 |
| 79 |
%64 = OpSelect %int %42 %int_60 %60 |
| 80 |
OpBranch %34 |
| 81 |
%34 = OpLabel |
| 82 |
%58 = OpPhi %int %int_50 %33 %64 %36 |
| 83 |
%49 = OpIAdd %int %58 %int_10 |
| 84 |
%51 = OpLoad %v4float %FragColor |
| 85 |
%53 = OpFAdd %v4float %51 %63 |
| 86 |
OpStore %FragColor %53 |
| 87 |
OpBranch %20 |
| 88 |
%20 = OpLabel |
| 89 |
%56 = OpIAdd %int %57 %49 |
| 90 |
OpBranch %17 |
| 91 |
%19 = OpLabel |
| 92 |
OpReturn |
| 93 |
OpFunctionEnd |