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