1 OpCapability Shader 2 %1 = OpExtInstImport "GLSL.std.450" 3 OpMemoryModel Logical GLSL450 4 OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor 5 OpExecutionMode %_entrypoint_v OriginUpperLeft 6 OpName %sk_FragColor "sk_FragColor" 7 OpName %scratchVar "scratchVar" 8 OpName %_UniformBuffer "_UniformBuffer" 9 OpMemberName %_UniformBuffer 0 "colorGreen" 10 OpMemberName %_UniformBuffer 1 "colorRed" 11 OpName %_entrypoint_v "_entrypoint_v" 12 OpName %test_flat_b "test_flat_b" 13 OpName %test_if_b "test_if_b" 14 OpName %test_else_b "test_else_b" 15 OpName %test_loop_if_b "test_loop_if_b" 16 OpName %x "x" 17 OpName %main "main" 18 OpDecorate %sk_FragColor RelaxedPrecision 19 OpDecorate %sk_FragColor Location 0 20 OpDecorate %sk_FragColor Index 0 21 OpMemberDecorate %_UniformBuffer 0 Offset 0 22 OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision 23 OpMemberDecorate %_UniformBuffer 1 Offset 16 24 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision 25 OpDecorate %_UniformBuffer Block 26 OpDecorate %15 Binding 0 27 OpDecorate %15 DescriptorSet 0 28 OpDecorate %35 RelaxedPrecision 29 OpDecorate %36 RelaxedPrecision 30 OpDecorate %49 RelaxedPrecision 31 OpDecorate %50 RelaxedPrecision 32 OpDecorate %66 RelaxedPrecision 33 OpDecorate %67 RelaxedPrecision 34 OpDecorate %98 RelaxedPrecision 35 OpDecorate %100 RelaxedPrecision 36 OpDecorate %101 RelaxedPrecision 37 %float = OpTypeFloat 32 38 %v4float = OpTypeVector %float 4 39%_ptr_Output_v4float = OpTypePointer Output %v4float 40%sk_FragColor = OpVariable %_ptr_Output_v4float Output 41 %int = OpTypeInt 32 1 42%_ptr_Private_int = OpTypePointer Private %int 43 %scratchVar = OpVariable %_ptr_Private_int Private 44 %int_0 = OpConstant %int 0 45%_UniformBuffer = OpTypeStruct %v4float %v4float 46%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer 47 %15 = OpVariable %_ptr_Uniform__UniformBuffer Uniform 48 %void = OpTypeVoid 49 %20 = OpTypeFunction %void 50 %float_0 = OpConstant %float 0 51 %v2float = OpTypeVector %float 2 52 %24 = OpConstantComposite %v2float %float_0 %float_0 53%_ptr_Function_v2float = OpTypePointer Function %v2float 54 %bool = OpTypeBool 55 %29 = OpTypeFunction %bool 56 %true = OpConstantTrue %bool 57%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float 58 %int_1 = OpConstant %int 1 59 %false = OpConstantFalse %bool 60%_ptr_Function_int = OpTypePointer Function %int 61 %76 = OpTypeFunction %v4float %_ptr_Function_v2float 62%_ptr_Function_v4float = OpTypePointer Function %v4float 63%_entrypoint_v = OpFunction %void None %20 64 %21 = OpLabel 65 %25 = OpVariable %_ptr_Function_v2float Function 66 OpStore %25 %24 67 %27 = OpFunctionCall %v4float %main %25 68 OpStore %sk_FragColor %27 69 OpReturn 70 OpFunctionEnd 71%test_flat_b = OpFunction %bool None %29 72 %30 = OpLabel 73 OpReturnValue %true 74 OpFunctionEnd 75 %test_if_b = OpFunction %bool None %29 76 %32 = OpLabel 77 %33 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 78 %35 = OpLoad %v4float %33 79 %36 = OpCompositeExtract %float %35 1 80 %37 = OpFOrdGreaterThan %bool %36 %float_0 81 OpSelectionMerge %40 None 82 OpBranchConditional %37 %38 %39 83 %38 = OpLabel 84 OpReturnValue %true 85 %39 = OpLabel 86 %42 = OpLoad %int %scratchVar 87 %43 = OpIAdd %int %42 %int_1 88 OpStore %scratchVar %43 89 OpBranch %40 90 %40 = OpLabel 91 %44 = OpLoad %int %scratchVar 92 %45 = OpIAdd %int %44 %int_1 93 OpStore %scratchVar %45 94 OpReturnValue %false 95 OpFunctionEnd 96%test_else_b = OpFunction %bool None %29 97 %47 = OpLabel 98 %48 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 99 %49 = OpLoad %v4float %48 100 %50 = OpCompositeExtract %float %49 1 101 %51 = OpFOrdEqual %bool %50 %float_0 102 OpSelectionMerge %54 None 103 OpBranchConditional %51 %52 %53 104 %52 = OpLabel 105 OpReturnValue %false 106 %53 = OpLabel 107 OpReturnValue %true 108 %54 = OpLabel 109 OpUnreachable 110 OpFunctionEnd 111%test_loop_if_b = OpFunction %bool None %29 112 %55 = OpLabel 113 %x = OpVariable %_ptr_Function_int Function 114 OpStore %x %int_0 115 OpBranch %58 116 %58 = OpLabel 117 OpLoopMerge %62 %61 None 118 OpBranch %59 119 %59 = OpLabel 120 %63 = OpLoad %int %x 121 %64 = OpSLessThanEqual %bool %63 %int_1 122 OpBranchConditional %64 %60 %62 123 %60 = OpLabel 124 %65 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 125 %66 = OpLoad %v4float %65 126 %67 = OpCompositeExtract %float %66 1 127 %68 = OpFOrdEqual %bool %67 %float_0 128 OpSelectionMerge %71 None 129 OpBranchConditional %68 %69 %70 130 %69 = OpLabel 131 OpReturnValue %false 132 %70 = OpLabel 133 OpReturnValue %true 134 %71 = OpLabel 135 OpBranch %61 136 %61 = OpLabel 137 %72 = OpLoad %int %x 138 %73 = OpIAdd %int %72 %int_1 139 OpStore %x %73 140 OpBranch %58 141 %62 = OpLabel 142 %74 = OpLoad %int %scratchVar 143 %75 = OpIAdd %int %74 %int_1 144 OpStore %scratchVar %75 145 OpReturnValue %true 146 OpFunctionEnd 147 %main = OpFunction %v4float None %76 148 %77 = OpFunctionParameter %_ptr_Function_v2float 149 %78 = OpLabel 150 %92 = OpVariable %_ptr_Function_v4float Function 151 OpStore %scratchVar %int_0 152 %79 = OpFunctionCall %bool %test_flat_b 153 OpSelectionMerge %81 None 154 OpBranchConditional %79 %80 %81 155 %80 = OpLabel 156 %82 = OpFunctionCall %bool %test_if_b 157 OpBranch %81 158 %81 = OpLabel 159 %83 = OpPhi %bool %false %78 %82 %80 160 OpSelectionMerge %85 None 161 OpBranchConditional %83 %84 %85 162 %84 = OpLabel 163 %86 = OpFunctionCall %bool %test_else_b 164 OpBranch %85 165 %85 = OpLabel 166 %87 = OpPhi %bool %false %81 %86 %84 167 OpSelectionMerge %89 None 168 OpBranchConditional %87 %88 %89 169 %88 = OpLabel 170 %90 = OpFunctionCall %bool %test_loop_if_b 171 OpBranch %89 172 %89 = OpLabel 173 %91 = OpPhi %bool %false %85 %90 %88 174 OpSelectionMerge %96 None 175 OpBranchConditional %91 %94 %95 176 %94 = OpLabel 177 %97 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 178 %98 = OpLoad %v4float %97 179 OpStore %92 %98 180 OpBranch %96 181 %95 = OpLabel 182 %99 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1 183 %100 = OpLoad %v4float %99 184 OpStore %92 %100 185 OpBranch %96 186 %96 = OpLabel 187 %101 = OpLoad %v4float %92 188 OpReturnValue %101 189 OpFunctionEnd 190