1617a3babSopenharmony_ci; SPIR-V 2617a3babSopenharmony_ci; Version: 1.0 3617a3babSopenharmony_ci; Generator: Khronos Glslang Reference Front End; 8 4617a3babSopenharmony_ci; Bound: 193 5617a3babSopenharmony_ci; Schema: 0 6617a3babSopenharmony_ci OpCapability Shader 7617a3babSopenharmony_ci %1 = OpExtInstImport "GLSL.std.450" 8617a3babSopenharmony_ci OpMemoryModel Logical GLSL450 9617a3babSopenharmony_ci OpEntryPoint Fragment %main "main" %x %BaseColor %Count %bigColor %outColor %v4 %f_0 10617a3babSopenharmony_ci OpExecutionMode %main OriginUpperLeft 11617a3babSopenharmony_ci OpSource ESSL 310 12617a3babSopenharmony_ci OpName %main "main" 13617a3babSopenharmony_ci OpName %c "c" 14617a3babSopenharmony_ci OpName %f "f" 15617a3babSopenharmony_ci OpName %x "x" 16617a3babSopenharmony_ci OpName %d "d" 17617a3babSopenharmony_ci OpName %color "color" 18617a3babSopenharmony_ci OpName %BaseColor "BaseColor" 19617a3babSopenharmony_ci OpName %i "i" 20617a3babSopenharmony_ci OpName %Count "Count" 21617a3babSopenharmony_ci OpName %bigColor "bigColor" 22617a3babSopenharmony_ci OpName %outColor "outColor" 23617a3babSopenharmony_ci OpName %sum "sum" 24617a3babSopenharmony_ci OpName %i_0 "i" 25617a3babSopenharmony_ci OpName %v4 "v4" 26617a3babSopenharmony_ci OpName %i_1 "i" 27617a3babSopenharmony_ci OpName %tv4 "tv4" 28617a3babSopenharmony_ci OpName %r "r" 29617a3babSopenharmony_ci OpName %i_2 "i" 30617a3babSopenharmony_ci OpName %i_3 "i" 31617a3babSopenharmony_ci OpName %i_4 "i" 32617a3babSopenharmony_ci OpName %A "A" 33617a3babSopenharmony_ci OpName %B "B" 34617a3babSopenharmony_ci OpName %C "C" 35617a3babSopenharmony_ci OpName %D "D" 36617a3babSopenharmony_ci OpName %f_0 "f" 37617a3babSopenharmony_ci OpDecorate %f RelaxedPrecision 38617a3babSopenharmony_ci OpDecorate %x Location 0 39617a3babSopenharmony_ci OpDecorate %color RelaxedPrecision 40617a3babSopenharmony_ci OpDecorate %BaseColor RelaxedPrecision 41617a3babSopenharmony_ci OpDecorate %BaseColor Location 2 42617a3babSopenharmony_ci OpDecorate %47 RelaxedPrecision 43617a3babSopenharmony_ci OpDecorate %Count Flat 44617a3babSopenharmony_ci OpDecorate %Count Location 4 45617a3babSopenharmony_ci OpDecorate %bigColor RelaxedPrecision 46617a3babSopenharmony_ci OpDecorate %bigColor Location 1 47617a3babSopenharmony_ci OpDecorate %63 RelaxedPrecision 48617a3babSopenharmony_ci OpDecorate %64 RelaxedPrecision 49617a3babSopenharmony_ci OpDecorate %65 RelaxedPrecision 50617a3babSopenharmony_ci OpDecorate %outColor RelaxedPrecision 51617a3babSopenharmony_ci OpDecorate %outColor Location 0 52617a3babSopenharmony_ci OpDecorate %71 RelaxedPrecision 53617a3babSopenharmony_ci OpDecorate %sum RelaxedPrecision 54617a3babSopenharmony_ci OpDecorate %v4 Flat 55617a3babSopenharmony_ci OpDecorate %v4 Location 5 56617a3babSopenharmony_ci OpDecorate %91 RelaxedPrecision 57617a3babSopenharmony_ci OpDecorate %92 RelaxedPrecision 58617a3babSopenharmony_ci OpDecorate %93 RelaxedPrecision 59617a3babSopenharmony_ci OpDecorate %tv4 RelaxedPrecision 60617a3babSopenharmony_ci OpDecorate %111 RelaxedPrecision 61617a3babSopenharmony_ci OpDecorate %115 RelaxedPrecision 62617a3babSopenharmony_ci OpDecorate %116 RelaxedPrecision 63617a3babSopenharmony_ci OpDecorate %117 RelaxedPrecision 64617a3babSopenharmony_ci OpDecorate %118 RelaxedPrecision 65617a3babSopenharmony_ci OpDecorate %119 RelaxedPrecision 66617a3babSopenharmony_ci OpDecorate %120 RelaxedPrecision 67617a3babSopenharmony_ci OpDecorate %r RelaxedPrecision 68617a3babSopenharmony_ci OpDecorate %123 RelaxedPrecision 69617a3babSopenharmony_ci OpDecorate %124 RelaxedPrecision 70617a3babSopenharmony_ci OpDecorate %136 RelaxedPrecision 71617a3babSopenharmony_ci OpDecorate %141 RelaxedPrecision 72617a3babSopenharmony_ci OpDecorate %142 RelaxedPrecision 73617a3babSopenharmony_ci OpDecorate %143 RelaxedPrecision 74617a3babSopenharmony_ci OpDecorate %144 RelaxedPrecision 75617a3babSopenharmony_ci OpDecorate %145 RelaxedPrecision 76617a3babSopenharmony_ci OpDecorate %157 RelaxedPrecision 77617a3babSopenharmony_ci OpDecorate %158 RelaxedPrecision 78617a3babSopenharmony_ci OpDecorate %159 RelaxedPrecision 79617a3babSopenharmony_ci OpDecorate %f_0 RelaxedPrecision 80617a3babSopenharmony_ci OpDecorate %f_0 Location 3 81617a3babSopenharmony_ci %void = OpTypeVoid 82617a3babSopenharmony_ci %3 = OpTypeFunction %void 83617a3babSopenharmony_ci %int = OpTypeInt 32 1 84617a3babSopenharmony_ci%_ptr_Private_int = OpTypePointer Private %int 85617a3babSopenharmony_ci %c = OpVariable %_ptr_Private_int Private 86617a3babSopenharmony_ci %float = OpTypeFloat 32 87617a3babSopenharmony_ci%_ptr_Function_float = OpTypePointer Function %float 88617a3babSopenharmony_ci%_ptr_Input_float = OpTypePointer Input %float 89617a3babSopenharmony_ci %x = OpVariable %_ptr_Input_float Input 90617a3babSopenharmony_ci %d = OpVariable %_ptr_Private_int Private 91617a3babSopenharmony_ci %v4float = OpTypeVector %float 4 92617a3babSopenharmony_ci%_ptr_Function_v4float = OpTypePointer Function %v4float 93617a3babSopenharmony_ci%_ptr_Input_v4float = OpTypePointer Input %v4float 94617a3babSopenharmony_ci %BaseColor = OpVariable %_ptr_Input_v4float Input 95617a3babSopenharmony_ci%_ptr_Function_int = OpTypePointer Function %int 96617a3babSopenharmony_ci %int_0 = OpConstant %int 0 97617a3babSopenharmony_ci%_ptr_Input_int = OpTypePointer Input %int 98617a3babSopenharmony_ci %Count = OpVariable %_ptr_Input_int Input 99617a3babSopenharmony_ci %bool = OpTypeBool 100617a3babSopenharmony_ci %bigColor = OpVariable %_ptr_Input_v4float Input 101617a3babSopenharmony_ci %int_1 = OpConstant %int 1 102617a3babSopenharmony_ci%_ptr_Output_v4float = OpTypePointer Output %v4float 103617a3babSopenharmony_ci %outColor = OpVariable %_ptr_Output_v4float Output 104617a3babSopenharmony_ci %float_0 = OpConstant %float 0 105617a3babSopenharmony_ci %int_4 = OpConstant %int 4 106617a3babSopenharmony_ci %uint = OpTypeInt 32 0 107617a3babSopenharmony_ci %v4uint = OpTypeVector %uint 4 108617a3babSopenharmony_ci%_ptr_Input_v4uint = OpTypePointer Input %v4uint 109617a3babSopenharmony_ci %v4 = OpVariable %_ptr_Input_v4uint Input 110617a3babSopenharmony_ci%_ptr_Input_uint = OpTypePointer Input %uint 111617a3babSopenharmony_ci %uint_4 = OpConstant %uint 4 112617a3babSopenharmony_ci %v3float = OpTypeVector %float 3 113617a3babSopenharmony_ci %uint_3 = OpConstant %uint 3 114617a3babSopenharmony_ci %int_16 = OpConstant %int 16 115617a3babSopenharmony_ci %int_10 = OpConstant %int 10 116617a3babSopenharmony_ci %int_2 = OpConstant %int 2 117617a3babSopenharmony_ci %int_5 = OpConstant %int 5 118617a3babSopenharmony_ci %int_3 = OpConstant %int 3 119617a3babSopenharmony_ci %f_0 = OpVariable %_ptr_Input_float Input 120617a3babSopenharmony_ci %main = OpFunction %void None %3 121617a3babSopenharmony_ci %5 = OpLabel 122617a3babSopenharmony_ci %f = OpVariable %_ptr_Function_float Function 123617a3babSopenharmony_ci %color = OpVariable %_ptr_Function_v4float Function 124617a3babSopenharmony_ci %i = OpVariable %_ptr_Function_int Function 125617a3babSopenharmony_ci %sum = OpVariable %_ptr_Function_float Function 126617a3babSopenharmony_ci %i_0 = OpVariable %_ptr_Function_int Function 127617a3babSopenharmony_ci %i_1 = OpVariable %_ptr_Function_int Function 128617a3babSopenharmony_ci %tv4 = OpVariable %_ptr_Function_v4float Function 129617a3babSopenharmony_ci %r = OpVariable %_ptr_Function_v4float Function 130617a3babSopenharmony_ci %i_2 = OpVariable %_ptr_Function_int Function 131617a3babSopenharmony_ci %i_3 = OpVariable %_ptr_Function_int Function 132617a3babSopenharmony_ci %i_4 = OpVariable %_ptr_Function_int Function 133617a3babSopenharmony_ci %A = OpVariable %_ptr_Function_int Function 134617a3babSopenharmony_ci %B = OpVariable %_ptr_Function_int Function 135617a3babSopenharmony_ci %C = OpVariable %_ptr_Function_int Function 136617a3babSopenharmony_ci %D = OpVariable %_ptr_Function_int Function 137617a3babSopenharmony_ci %9 = OpLoad %int %c 138617a3babSopenharmony_ci OpSelectionMerge %13 None 139617a3babSopenharmony_ci OpSwitch %9 %12 1 %10 2 %11 140617a3babSopenharmony_ci %12 = OpLabel 141617a3babSopenharmony_ci %39 = OpLoad %float %x 142617a3babSopenharmony_ci %40 = OpExtInst %float %1 Tan %39 143617a3babSopenharmony_ci OpStore %f %40 144617a3babSopenharmony_ci OpBranch %13 145617a3babSopenharmony_ci %10 = OpLabel 146617a3babSopenharmony_ci %19 = OpLoad %float %x 147617a3babSopenharmony_ci %20 = OpExtInst %float %1 Sin %19 148617a3babSopenharmony_ci OpStore %f %20 149617a3babSopenharmony_ci OpBranch %13 150617a3babSopenharmony_ci %11 = OpLabel 151617a3babSopenharmony_ci %23 = OpLoad %int %d 152617a3babSopenharmony_ci OpSelectionMerge %26 None 153617a3babSopenharmony_ci OpSwitch %23 %26 1 %24 2 %25 154617a3babSopenharmony_ci %24 = OpLabel 155617a3babSopenharmony_ci %27 = OpLoad %float %x 156617a3babSopenharmony_ci %28 = OpLoad %float %x 157617a3babSopenharmony_ci %29 = OpFMul %float %27 %28 158617a3babSopenharmony_ci %30 = OpLoad %float %x 159617a3babSopenharmony_ci %31 = OpFMul %float %29 %30 160617a3babSopenharmony_ci OpStore %f %31 161617a3babSopenharmony_ci OpBranch %26 162617a3babSopenharmony_ci %25 = OpLabel 163617a3babSopenharmony_ci %33 = OpLoad %float %x 164617a3babSopenharmony_ci %34 = OpLoad %float %x 165617a3babSopenharmony_ci %35 = OpFMul %float %33 %34 166617a3babSopenharmony_ci OpStore %f %35 167617a3babSopenharmony_ci OpBranch %26 168617a3babSopenharmony_ci %26 = OpLabel 169617a3babSopenharmony_ci OpBranch %13 170617a3babSopenharmony_ci %13 = OpLabel 171617a3babSopenharmony_ci %47 = OpLoad %v4float %BaseColor 172617a3babSopenharmony_ci OpStore %color %47 173617a3babSopenharmony_ci OpStore %i %int_0 174617a3babSopenharmony_ci OpBranch %51 175617a3babSopenharmony_ci %51 = OpLabel 176617a3babSopenharmony_ci OpLoopMerge %53 %54 None 177617a3babSopenharmony_ci OpBranch %55 178617a3babSopenharmony_ci %55 = OpLabel 179617a3babSopenharmony_ci %56 = OpLoad %int %i 180617a3babSopenharmony_ci %59 = OpLoad %int %Count 181617a3babSopenharmony_ci %61 = OpSLessThan %bool %56 %59 182617a3babSopenharmony_ci OpBranchConditional %61 %52 %53 183617a3babSopenharmony_ci %52 = OpLabel 184617a3babSopenharmony_ci %63 = OpLoad %v4float %bigColor 185617a3babSopenharmony_ci %64 = OpLoad %v4float %color 186617a3babSopenharmony_ci %65 = OpFAdd %v4float %64 %63 187617a3babSopenharmony_ci OpStore %color %65 188617a3babSopenharmony_ci OpBranch %54 189617a3babSopenharmony_ci %54 = OpLabel 190617a3babSopenharmony_ci %66 = OpLoad %int %i 191617a3babSopenharmony_ci %68 = OpIAdd %int %66 %int_1 192617a3babSopenharmony_ci OpStore %i %68 193617a3babSopenharmony_ci OpBranch %51 194617a3babSopenharmony_ci %53 = OpLabel 195617a3babSopenharmony_ci %71 = OpLoad %v4float %color 196617a3babSopenharmony_ci OpStore %outColor %71 197617a3babSopenharmony_ci OpStore %sum %float_0 198617a3babSopenharmony_ci OpStore %i_0 %int_0 199617a3babSopenharmony_ci OpBranch %75 200617a3babSopenharmony_ci %75 = OpLabel 201617a3babSopenharmony_ci OpLoopMerge %77 %78 None 202617a3babSopenharmony_ci OpBranch %79 203617a3babSopenharmony_ci %79 = OpLabel 204617a3babSopenharmony_ci %80 = OpLoad %int %i_0 205617a3babSopenharmony_ci %82 = OpSLessThan %bool %80 %int_4 206617a3babSopenharmony_ci OpBranchConditional %82 %76 %77 207617a3babSopenharmony_ci %76 = OpLabel 208617a3babSopenharmony_ci %87 = OpLoad %int %i_0 209617a3babSopenharmony_ci %89 = OpAccessChain %_ptr_Input_uint %v4 %87 210617a3babSopenharmony_ci %90 = OpLoad %uint %89 211617a3babSopenharmony_ci %91 = OpConvertUToF %float %90 212617a3babSopenharmony_ci %92 = OpLoad %float %sum 213617a3babSopenharmony_ci %93 = OpFAdd %float %92 %91 214617a3babSopenharmony_ci OpStore %sum %93 215617a3babSopenharmony_ci OpBranch %78 216617a3babSopenharmony_ci %78 = OpLabel 217617a3babSopenharmony_ci %94 = OpLoad %int %i_0 218617a3babSopenharmony_ci %95 = OpIAdd %int %94 %int_1 219617a3babSopenharmony_ci OpStore %i_0 %95 220617a3babSopenharmony_ci OpBranch %75 221617a3babSopenharmony_ci %77 = OpLabel 222617a3babSopenharmony_ci OpStore %i_1 %int_0 223617a3babSopenharmony_ci OpBranch %97 224617a3babSopenharmony_ci %97 = OpLabel 225617a3babSopenharmony_ci OpLoopMerge %99 %100 None 226617a3babSopenharmony_ci OpBranch %101 227617a3babSopenharmony_ci %101 = OpLabel 228617a3babSopenharmony_ci %102 = OpLoad %int %i_1 229617a3babSopenharmony_ci %103 = OpSLessThan %bool %102 %int_4 230617a3babSopenharmony_ci OpBranchConditional %103 %98 %99 231617a3babSopenharmony_ci %98 = OpLabel 232617a3babSopenharmony_ci %105 = OpLoad %int %i_1 233617a3babSopenharmony_ci %106 = OpLoad %int %i_1 234617a3babSopenharmony_ci %107 = OpAccessChain %_ptr_Input_uint %v4 %106 235617a3babSopenharmony_ci %108 = OpLoad %uint %107 236617a3babSopenharmony_ci %110 = OpIMul %uint %108 %uint_4 237617a3babSopenharmony_ci %111 = OpConvertUToF %float %110 238617a3babSopenharmony_ci %112 = OpAccessChain %_ptr_Function_float %tv4 %105 239617a3babSopenharmony_ci OpStore %112 %111 240617a3babSopenharmony_ci OpBranch %100 241617a3babSopenharmony_ci %100 = OpLabel 242617a3babSopenharmony_ci %113 = OpLoad %int %i_1 243617a3babSopenharmony_ci %114 = OpIAdd %int %113 %int_1 244617a3babSopenharmony_ci OpStore %i_1 %114 245617a3babSopenharmony_ci OpBranch %97 246617a3babSopenharmony_ci %99 = OpLabel 247617a3babSopenharmony_ci %115 = OpLoad %float %sum 248617a3babSopenharmony_ci %116 = OpCompositeConstruct %v4float %115 %115 %115 %115 249617a3babSopenharmony_ci %117 = OpLoad %v4float %tv4 250617a3babSopenharmony_ci %118 = OpFAdd %v4float %116 %117 251617a3babSopenharmony_ci %119 = OpLoad %v4float %outColor 252617a3babSopenharmony_ci %120 = OpFAdd %v4float %119 %118 253617a3babSopenharmony_ci OpStore %outColor %120 254617a3babSopenharmony_ci %123 = OpLoad %v4float %BaseColor 255617a3babSopenharmony_ci %124 = OpVectorShuffle %v3float %123 %123 0 1 2 256617a3babSopenharmony_ci %125 = OpLoad %v4float %r 257617a3babSopenharmony_ci %126 = OpVectorShuffle %v4float %125 %124 4 5 6 3 258617a3babSopenharmony_ci OpStore %r %126 259617a3babSopenharmony_ci OpStore %i_2 %int_0 260617a3babSopenharmony_ci OpBranch %128 261617a3babSopenharmony_ci %128 = OpLabel 262617a3babSopenharmony_ci OpLoopMerge %130 %131 None 263617a3babSopenharmony_ci OpBranch %132 264617a3babSopenharmony_ci %132 = OpLabel 265617a3babSopenharmony_ci %133 = OpLoad %int %i_2 266617a3babSopenharmony_ci %134 = OpLoad %int %Count 267617a3babSopenharmony_ci %135 = OpSLessThan %bool %133 %134 268617a3babSopenharmony_ci OpBranchConditional %135 %129 %130 269617a3babSopenharmony_ci %129 = OpLabel 270617a3babSopenharmony_ci %136 = OpLoad %float %f 271617a3babSopenharmony_ci %138 = OpAccessChain %_ptr_Function_float %r %uint_3 272617a3babSopenharmony_ci OpStore %138 %136 273617a3babSopenharmony_ci OpBranch %131 274617a3babSopenharmony_ci %131 = OpLabel 275617a3babSopenharmony_ci %139 = OpLoad %int %i_2 276617a3babSopenharmony_ci %140 = OpIAdd %int %139 %int_1 277617a3babSopenharmony_ci OpStore %i_2 %140 278617a3babSopenharmony_ci OpBranch %128 279617a3babSopenharmony_ci %130 = OpLabel 280617a3babSopenharmony_ci %141 = OpLoad %v4float %r 281617a3babSopenharmony_ci %142 = OpVectorShuffle %v3float %141 %141 0 1 2 282617a3babSopenharmony_ci %143 = OpLoad %v4float %outColor 283617a3babSopenharmony_ci %144 = OpVectorShuffle %v3float %143 %143 0 1 2 284617a3babSopenharmony_ci %145 = OpFAdd %v3float %144 %142 285617a3babSopenharmony_ci %146 = OpLoad %v4float %outColor 286617a3babSopenharmony_ci %147 = OpVectorShuffle %v4float %146 %145 4 5 6 3 287617a3babSopenharmony_ci OpStore %outColor %147 288617a3babSopenharmony_ci OpStore %i_3 %int_0 289617a3babSopenharmony_ci OpBranch %149 290617a3babSopenharmony_ci %149 = OpLabel 291617a3babSopenharmony_ci OpLoopMerge %151 %152 None 292617a3babSopenharmony_ci OpBranch %153 293617a3babSopenharmony_ci %153 = OpLabel 294617a3babSopenharmony_ci %154 = OpLoad %int %i_3 295617a3babSopenharmony_ci %156 = OpSLessThan %bool %154 %int_16 296617a3babSopenharmony_ci OpBranchConditional %156 %150 %151 297617a3babSopenharmony_ci %150 = OpLabel 298617a3babSopenharmony_ci %157 = OpLoad %float %f 299617a3babSopenharmony_ci %158 = OpLoad %v4float %outColor 300617a3babSopenharmony_ci %159 = OpVectorTimesScalar %v4float %158 %157 301617a3babSopenharmony_ci OpStore %outColor %159 302617a3babSopenharmony_ci OpBranch %152 303617a3babSopenharmony_ci %152 = OpLabel 304617a3babSopenharmony_ci %160 = OpLoad %int %i_3 305617a3babSopenharmony_ci %161 = OpIAdd %int %160 %int_4 306617a3babSopenharmony_ci OpStore %i_3 %161 307617a3babSopenharmony_ci OpBranch %149 308617a3babSopenharmony_ci %151 = OpLabel 309617a3babSopenharmony_ci OpStore %i_4 %int_0 310617a3babSopenharmony_ci OpBranch %163 311617a3babSopenharmony_ci %163 = OpLabel 312617a3babSopenharmony_ci OpLoopMerge %165 %166 None 313617a3babSopenharmony_ci OpBranch %167 314617a3babSopenharmony_ci %167 = OpLabel 315617a3babSopenharmony_ci %168 = OpLoad %int %i_4 316617a3babSopenharmony_ci %170 = OpSLessThan %bool %168 %int_10 317617a3babSopenharmony_ci OpBranchConditional %170 %164 %165 318617a3babSopenharmony_ci %164 = OpLabel 319617a3babSopenharmony_ci OpStore %A %int_1 320617a3babSopenharmony_ci %172 = OpLoad %int %i_4 321617a3babSopenharmony_ci %174 = OpSMod %int %172 %int_2 322617a3babSopenharmony_ci %175 = OpIEqual %bool %174 %int_0 323617a3babSopenharmony_ci OpSelectionMerge %177 None 324617a3babSopenharmony_ci OpBranchConditional %175 %176 %177 325617a3babSopenharmony_ci %176 = OpLabel 326617a3babSopenharmony_ci OpStore %B %int_2 327617a3babSopenharmony_ci OpBranch %166 328617a3babSopenharmony_ci %177 = OpLabel 329617a3babSopenharmony_ci %181 = OpLoad %int %i_4 330617a3babSopenharmony_ci %183 = OpSMod %int %181 %int_5 331617a3babSopenharmony_ci %184 = OpIEqual %bool %183 %int_0 332617a3babSopenharmony_ci OpSelectionMerge %186 None 333617a3babSopenharmony_ci OpBranchConditional %184 %185 %186 334617a3babSopenharmony_ci %185 = OpLabel 335617a3babSopenharmony_ci OpStore %B %int_2 336617a3babSopenharmony_ci OpBranch %165 337617a3babSopenharmony_ci %186 = OpLabel 338617a3babSopenharmony_ci %188 = OpLoad %int %i_4 339617a3babSopenharmony_ci %189 = OpIAdd %int %188 %int_1 340617a3babSopenharmony_ci OpStore %i_4 %189 341617a3babSopenharmony_ci OpBranch %166 342617a3babSopenharmony_ci %166 = OpLabel 343617a3babSopenharmony_ci OpBranch %163 344617a3babSopenharmony_ci %165 = OpLabel 345617a3babSopenharmony_ci OpStore %D %int_3 346617a3babSopenharmony_ci OpReturn 347617a3babSopenharmony_ci OpFunctionEnd 348