| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 278 |
| ; Schema: 0 |
| OpCapability Shader |
| %59 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %buf1 "buf1" |
| OpMemberName %buf1 0 "injectionSwitch" |
| OpName %x_6 "x_6" |
| OpName %buf0 "buf0" |
| OpMemberName %buf0 0 "resolution" |
| OpName %x_9 "x_9" |
| OpName %gl_FragCoord "gl_FragCoord" |
| OpName %x_GLF_color "x_GLF_color" |
| OpName %tint_symbol "tint_symbol" |
| OpName %tint_symbol_2 "tint_symbol_2" |
| OpName %main_1 "main_1" |
| OpName %c "c" |
| OpName %x_54 "x_54" |
| OpName %x_58 "x_58" |
| OpName %x_59 "x_59" |
| OpName %x_91 "x_91" |
| OpName %x_92 "x_92" |
| OpName %x_135 "x_135" |
| OpName %x_136 "x_136" |
| OpName %x_58_phi "x_58_phi" |
| OpName %x_61_phi "x_61_phi" |
| OpName %x_91_phi "x_91_phi" |
| OpName %x_92_phi "x_92_phi" |
| OpName %x_93_phi "x_93_phi" |
| OpName %x_95_phi "x_95_phi" |
| OpName %x_139_phi "x_139_phi" |
| OpName %x_146_phi "x_146_phi" |
| OpName %x_71 "x_71" |
| OpName %x_79 "x_79" |
| OpName %x_62 "x_62" |
| OpName %x_59_phi "x_59_phi" |
| OpName %x_78 "x_78" |
| OpName %x_79_phi "x_79_phi" |
| OpName %x_98 "x_98" |
| OpName %x_102 "x_102" |
| OpName %x_103 "x_103" |
| OpName %x_102_phi "x_102_phi" |
| OpName %x_105_phi "x_105_phi" |
| OpName %x_135_phi "x_135_phi" |
| OpName %x_136_phi "x_136_phi" |
| OpName %x_137_phi "x_137_phi" |
| OpName %x_115 "x_115" |
| OpName %x_123 "x_123" |
| OpName %x_106 "x_106" |
| OpName %x_103_phi "x_103_phi" |
| OpName %x_122 "x_122" |
| OpName %x_123_phi "x_123_phi" |
| OpName %x_147 "x_147" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "x_GLF_color_1" |
| OpName %tint_symbol_3 "tint_symbol_3" |
| OpName %tint_symbol_1 "tint_symbol_1" |
| OpName %main "main" |
| OpDecorate %buf1 Block |
| OpMemberDecorate %buf1 0 Offset 0 |
| OpDecorate %x_6 NonWritable |
| OpDecorate %x_6 DescriptorSet 0 |
| OpDecorate %x_6 Binding 1 |
| OpDecorate %buf0 Block |
| OpMemberDecorate %buf0 0 Offset 0 |
| OpDecorate %x_9 NonWritable |
| OpDecorate %x_9 DescriptorSet 0 |
| OpDecorate %x_9 Binding 0 |
| OpDecorate %tint_symbol BuiltIn FragCoord |
| OpDecorate %tint_symbol_2 Location 0 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %buf1 = OpTypeStruct %v2float |
| %_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1 |
| %x_6 = OpVariable %_ptr_Uniform_buf1 Uniform |
| %buf0 = OpTypeStruct %v2float |
| %_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0 |
| %x_9 = OpVariable %_ptr_Uniform_buf0 Uniform |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %12 = OpConstantNull %v4float |
| %gl_FragCoord = OpVariable %_ptr_Private_v4float Private %12 |
| %x_GLF_color = OpVariable %_ptr_Private_v4float Private %12 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %tint_symbol = OpVariable %_ptr_Input_v4float Input |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %12 |
| %void = OpTypeVoid |
| %18 = OpTypeFunction %void |
| %v3float = OpTypeVector %float 3 |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %25 = OpConstantNull %v3float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %28 = OpConstantNull %float |
| %int = OpTypeInt 32 1 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %39 = OpConstantNull %int |
| %bool = OpTypeBool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %45 = OpConstantNull %bool |
| %float_7 = OpConstant %float 7 |
| %float_8 = OpConstant %float 8 |
| %float_9 = OpConstant %float 9 |
| %52 = OpConstantComposite %v3float %float_7 %float_8 %float_9 |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %float_0_125 = OpConstant %float 0.125 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %float_n0_5 = OpConstant %float -0.5 |
| %int_1 = OpConstant %int 1 |
| %float_0 = OpConstant %float 0 |
| %false = OpConstantFalse %bool |
| %int_800 = OpConstant %int 800 |
| %int_32 = OpConstant %int 32 |
| %int_0 = OpConstant %int 0 |
| %float_0_400000006 = OpConstant %float 0.400000006 |
| %float_0_00999999978 = OpConstant %float 0.00999999978 |
| %float_100 = OpConstant %float 100 |
| %uint_1 = OpConstant %uint 1 |
| %true = OpConstantTrue %bool |
| %uint_2 = OpConstant %uint 2 |
| %int_3 = OpConstant %int 3 |
| %float_1 = OpConstant %float 1 |
| %main_out = OpTypeStruct %v4float |
| %265 = OpTypeFunction %void %main_out |
| %main_1 = OpFunction %void None %18 |
| %21 = OpLabel |
| %c = OpVariable %_ptr_Function_v3float Function %25 |
| %x_54 = OpVariable %_ptr_Function_float Function %28 |
| %x_58 = OpVariable %_ptr_Function_float Function %28 |
| %x_59 = OpVariable %_ptr_Function_float Function %28 |
| %x_91 = OpVariable %_ptr_Function_float Function %28 |
| %x_92 = OpVariable %_ptr_Function_float Function %28 |
| %x_135 = OpVariable %_ptr_Function_float Function %28 |
| %x_136 = OpVariable %_ptr_Function_float Function %28 |
| %x_58_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_61_phi = OpVariable %_ptr_Function_int Function %39 |
| %x_91_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_92_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_93_phi = OpVariable %_ptr_Function_bool Function %45 |
| %x_95_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_139_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_146_phi = OpVariable %_ptr_Function_int Function %39 |
| %x_71 = OpVariable %_ptr_Function_float Function %28 |
| %x_79 = OpVariable %_ptr_Function_float Function %28 |
| %x_62 = OpVariable %_ptr_Function_int Function %39 |
| %x_59_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_78 = OpVariable %_ptr_Function_float Function %28 |
| %x_79_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_98 = OpVariable %_ptr_Function_float Function %28 |
| %x_102 = OpVariable %_ptr_Function_float Function %28 |
| %x_103 = OpVariable %_ptr_Function_float Function %28 |
| %x_102_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_105_phi = OpVariable %_ptr_Function_int Function %39 |
| %x_135_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_136_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_137_phi = OpVariable %_ptr_Function_bool Function %45 |
| %x_115 = OpVariable %_ptr_Function_float Function %28 |
| %x_123 = OpVariable %_ptr_Function_float Function %28 |
| %x_106 = OpVariable %_ptr_Function_int Function %39 |
| %x_103_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_122 = OpVariable %_ptr_Function_float Function %28 |
| %x_123_phi = OpVariable %_ptr_Function_float Function %28 |
| %x_147 = OpVariable %_ptr_Function_int Function %39 |
| OpStore %c %52 |
| %56 = OpAccessChain %_ptr_Uniform_float %x_9 %uint_0 %uint_0 |
| %57 = OpLoad %float %56 |
| %61 = OpFMul %float %57 %float_0_125 |
| %58 = OpExtInst %float %59 RoundEven %61 |
| %63 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0 |
| %64 = OpLoad %float %63 |
| OpStore %x_54 %64 |
| OpSelectionMerge %65 None |
| OpSwitch %uint_0 %66 |
| %66 = OpLabel |
| OpStore %x_58_phi %float_n0_5 |
| OpStore %x_61_phi %int_1 |
| OpBranch %69 |
| %69 = OpLabel |
| OpLoopMerge %70 %71 None |
| OpBranch %72 |
| %72 = OpLabel |
| %77 = OpLoad %float %x_58_phi |
| OpStore %x_58 %77 |
| %78 = OpLoad %int %x_61_phi |
| OpStore %x_91_phi %float_0 |
| %80 = OpLoad %float %x_58 |
| OpStore %x_92_phi %80 |
| OpStore %x_93_phi %false |
| %83 = OpSLessThan %bool %78 %int_800 |
| OpSelectionMerge %84 None |
| OpBranchConditional %83 %85 %86 |
| %85 = OpLabel |
| OpBranch %84 |
| %86 = OpLabel |
| OpBranch %70 |
| %84 = OpLabel |
| %90 = OpSMod %int %78 %int_32 |
| %92 = OpIEqual %bool %90 %int_0 |
| OpSelectionMerge %93 None |
| OpBranchConditional %92 %94 %95 |
| %94 = OpLabel |
| %96 = OpLoad %float %x_58 |
| %98 = OpFAdd %float %96 %float_0_400000006 |
| OpStore %x_71 %98 |
| %99 = OpLoad %float %x_71 |
| OpStore %x_59_phi %99 |
| OpBranch %93 |
| %95 = OpLabel |
| %100 = OpLoad %float %x_58 |
| OpStore %x_79_phi %100 |
| %101 = OpConvertSToF %float %78 |
| %102 = OpExtInst %float %59 RoundEven %58 |
| %103 = OpFMod %float %101 %102 |
| %105 = OpFOrdLessThanEqual %bool %103 %float_0_00999999978 |
| OpSelectionMerge %106 None |
| OpBranchConditional %105 %107 %106 |
| %107 = OpLabel |
| %108 = OpLoad %float %x_58 |
| %110 = OpFAdd %float %108 %float_100 |
| OpStore %x_78 %110 |
| %111 = OpLoad %float %x_78 |
| OpStore %x_79_phi %111 |
| OpBranch %106 |
| %106 = OpLabel |
| %112 = OpLoad %float %x_79_phi |
| OpStore %x_79 %112 |
| %113 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0 |
| %114 = OpLoad %float %113 |
| %116 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1 |
| %117 = OpLoad %float %116 |
| %118 = OpFOrdGreaterThan %bool %114 %117 |
| OpSelectionMerge %119 None |
| OpBranchConditional %118 %120 %119 |
| %120 = OpLabel |
| OpKill |
| %119 = OpLabel |
| %121 = OpLoad %float %x_79 |
| OpStore %x_59_phi %121 |
| OpBranch %93 |
| %93 = OpLabel |
| %122 = OpLoad %float %x_59_phi |
| OpStore %x_59 %122 |
| %123 = OpConvertSToF %float %78 |
| %124 = OpLoad %float %x_54 |
| %125 = OpFOrdGreaterThanEqual %bool %123 %124 |
| OpSelectionMerge %126 None |
| OpBranchConditional %125 %127 %126 |
| %127 = OpLabel |
| %128 = OpLoad %float %x_59 |
| OpStore %x_91_phi %128 |
| %129 = OpLoad %float %x_59 |
| OpStore %x_92_phi %129 |
| OpStore %x_93_phi %true |
| OpBranch %70 |
| %126 = OpLabel |
| OpBranch %71 |
| %71 = OpLabel |
| %131 = OpIAdd %int %78 %int_1 |
| OpStore %x_62 %131 |
| %132 = OpLoad %float %x_59 |
| OpStore %x_58_phi %132 |
| %133 = OpLoad %int %x_62 |
| OpStore %x_61_phi %133 |
| OpBranch %69 |
| %70 = OpLabel |
| %134 = OpLoad %float %x_91_phi |
| OpStore %x_91 %134 |
| %135 = OpLoad %float %x_92_phi |
| OpStore %x_92 %135 |
| %136 = OpLoad %bool %x_93_phi |
| %137 = OpLoad %float %x_91 |
| OpStore %x_95_phi %137 |
| OpSelectionMerge %138 None |
| OpBranchConditional %136 %139 %138 |
| %139 = OpLabel |
| OpBranch %65 |
| %138 = OpLabel |
| %140 = OpLoad %float %x_92 |
| OpStore %x_95_phi %140 |
| OpBranch %65 |
| %65 = OpLabel |
| %149 = OpLoad %float %x_95_phi |
| %150 = OpAccessChain %_ptr_Function_float %c %uint_0 |
| OpStore %150 %149 |
| %151 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1 |
| %152 = OpLoad %float %151 |
| OpStore %x_98 %152 |
| OpSelectionMerge %153 None |
| OpSwitch %uint_0 %154 |
| %154 = OpLabel |
| OpStore %x_102_phi %float_n0_5 |
| OpStore %x_105_phi %int_1 |
| OpBranch %155 |
| %155 = OpLabel |
| OpLoopMerge %156 %157 None |
| OpBranch %158 |
| %158 = OpLabel |
| %163 = OpLoad %float %x_102_phi |
| OpStore %x_102 %163 |
| %164 = OpLoad %int %x_105_phi |
| OpStore %x_135_phi %float_0 |
| %165 = OpLoad %float %x_102 |
| OpStore %x_136_phi %165 |
| OpStore %x_137_phi %false |
| %166 = OpSLessThan %bool %164 %int_800 |
| OpSelectionMerge %167 None |
| OpBranchConditional %166 %168 %169 |
| %168 = OpLabel |
| OpBranch %167 |
| %169 = OpLabel |
| OpBranch %156 |
| %167 = OpLabel |
| %172 = OpSMod %int %164 %int_32 |
| %173 = OpIEqual %bool %172 %int_0 |
| OpSelectionMerge %174 None |
| OpBranchConditional %173 %175 %176 |
| %175 = OpLabel |
| %177 = OpLoad %float %x_102 |
| %178 = OpFAdd %float %177 %float_0_400000006 |
| OpStore %x_115 %178 |
| %179 = OpLoad %float %x_115 |
| OpStore %x_103_phi %179 |
| OpBranch %174 |
| %176 = OpLabel |
| %180 = OpLoad %float %x_102 |
| OpStore %x_123_phi %180 |
| %181 = OpConvertSToF %float %164 |
| %182 = OpExtInst %float %59 RoundEven %58 |
| %183 = OpFMod %float %181 %182 |
| %184 = OpFOrdLessThanEqual %bool %183 %float_0_00999999978 |
| OpSelectionMerge %185 None |
| OpBranchConditional %184 %186 %185 |
| %186 = OpLabel |
| %187 = OpLoad %float %x_102 |
| %188 = OpFAdd %float %187 %float_100 |
| OpStore %x_122 %188 |
| %189 = OpLoad %float %x_122 |
| OpStore %x_123_phi %189 |
| OpBranch %185 |
| %185 = OpLabel |
| %190 = OpLoad %float %x_123_phi |
| OpStore %x_123 %190 |
| %191 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0 |
| %192 = OpLoad %float %191 |
| %193 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1 |
| %194 = OpLoad %float %193 |
| %195 = OpFOrdGreaterThan %bool %192 %194 |
| OpSelectionMerge %196 None |
| OpBranchConditional %195 %197 %196 |
| %197 = OpLabel |
| OpKill |
| %196 = OpLabel |
| %198 = OpLoad %float %x_123 |
| OpStore %x_103_phi %198 |
| OpBranch %174 |
| %174 = OpLabel |
| %199 = OpLoad %float %x_103_phi |
| OpStore %x_103 %199 |
| %200 = OpConvertSToF %float %164 |
| %201 = OpLoad %float %x_98 |
| %202 = OpFOrdGreaterThanEqual %bool %200 %201 |
| OpSelectionMerge %203 None |
| OpBranchConditional %202 %204 %203 |
| %204 = OpLabel |
| %205 = OpLoad %float %x_103 |
| OpStore %x_135_phi %205 |
| %206 = OpLoad %float %x_103 |
| OpStore %x_136_phi %206 |
| OpStore %x_137_phi %true |
| OpBranch %156 |
| %203 = OpLabel |
| OpBranch %157 |
| %157 = OpLabel |
| %207 = OpIAdd %int %164 %int_1 |
| OpStore %x_106 %207 |
| %208 = OpLoad %float %x_103 |
| OpStore %x_102_phi %208 |
| %209 = OpLoad %int %x_106 |
| OpStore %x_105_phi %209 |
| OpBranch %155 |
| %156 = OpLabel |
| %210 = OpLoad %float %x_135_phi |
| OpStore %x_135 %210 |
| %211 = OpLoad %float %x_136_phi |
| OpStore %x_136 %211 |
| %212 = OpLoad %bool %x_137_phi |
| %213 = OpLoad %float %x_135 |
| OpStore %x_139_phi %213 |
| OpSelectionMerge %214 None |
| OpBranchConditional %212 %215 %214 |
| %215 = OpLabel |
| OpBranch %153 |
| %214 = OpLabel |
| %216 = OpLoad %float %x_136 |
| OpStore %x_139_phi %216 |
| OpBranch %153 |
| %153 = OpLabel |
| %217 = OpLoad %float %x_139_phi |
| %218 = OpAccessChain %_ptr_Function_float %c %uint_1 |
| OpStore %218 %217 |
| %219 = OpAccessChain %_ptr_Function_float %c %uint_0 |
| %220 = OpLoad %float %219 |
| %221 = OpAccessChain %_ptr_Function_float %c %uint_1 |
| %222 = OpLoad %float %221 |
| %224 = OpAccessChain %_ptr_Function_float %c %uint_2 |
| %225 = OpFAdd %float %220 %222 |
| OpStore %224 %225 |
| OpStore %x_146_phi %int_0 |
| OpBranch %226 |
| %226 = OpLabel |
| OpLoopMerge %227 %228 None |
| OpBranch %229 |
| %229 = OpLabel |
| %231 = OpLoad %int %x_146_phi |
| %233 = OpSLessThan %bool %231 %int_3 |
| OpSelectionMerge %234 None |
| OpBranchConditional %233 %235 %236 |
| %235 = OpLabel |
| OpBranch %234 |
| %236 = OpLabel |
| OpBranch %227 |
| %234 = OpLabel |
| %237 = OpAccessChain %_ptr_Function_float %c %231 |
| %238 = OpLoad %float %237 |
| %240 = OpFOrdGreaterThanEqual %bool %238 %float_1 |
| OpSelectionMerge %241 None |
| OpBranchConditional %240 %242 %241 |
| %242 = OpLabel |
| %243 = OpAccessChain %_ptr_Function_float %c %231 |
| %244 = OpLoad %float %243 |
| %245 = OpAccessChain %_ptr_Function_float %c %231 |
| %246 = OpLoad %float %245 |
| %247 = OpAccessChain %_ptr_Function_float %c %231 |
| %248 = OpFMul %float %244 %246 |
| OpStore %247 %248 |
| %249 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_0 |
| %250 = OpLoad %float %249 |
| %251 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %uint_1 |
| %252 = OpLoad %float %251 |
| %253 = OpFOrdGreaterThan %bool %250 %252 |
| OpSelectionMerge %254 None |
| OpBranchConditional %253 %255 %254 |
| %255 = OpLabel |
| OpKill |
| %254 = OpLabel |
| OpBranch %241 |
| %241 = OpLabel |
| OpBranch %228 |
| %228 = OpLabel |
| %256 = OpIAdd %int %231 %int_1 |
| OpStore %x_147 %256 |
| %257 = OpLoad %int %x_147 |
| OpStore %x_146_phi %257 |
| OpBranch %226 |
| %227 = OpLabel |
| %258 = OpLoad %v3float %c |
| %260 = OpExtInst %v3float %59 FAbs %258 |
| %259 = OpExtInst %v3float %59 Normalize %260 |
| %261 = OpCompositeExtract %float %259 0 |
| %262 = OpCompositeExtract %float %259 1 |
| %263 = OpCompositeExtract %float %259 2 |
| %264 = OpCompositeConstruct %v4float %261 %262 %263 %float_1 |
| OpStore %x_GLF_color %264 |
| OpReturn |
| OpFunctionEnd |
| %tint_symbol_3 = OpFunction %void None %265 |
| %tint_symbol_1 = OpFunctionParameter %main_out |
| %269 = OpLabel |
| %270 = OpCompositeExtract %v4float %tint_symbol_1 0 |
| OpStore %tint_symbol_2 %270 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %18 |
| %272 = OpLabel |
| %273 = OpLoad %v4float %tint_symbol |
| OpStore %gl_FragCoord %273 |
| %274 = OpFunctionCall %void %main_1 |
| %276 = OpLoad %v4float %x_GLF_color |
| %277 = OpCompositeConstruct %main_out %276 |
| %275 = OpFunctionCall %void %tint_symbol_3 %277 |
| OpReturn |
| OpFunctionEnd |