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