blob: e2f80edb940ad60d6cd80fea34d82092e90ca08b [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 277
; Schema: 0
OpCapability Shader
%58 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "resolution"
OpName %x_7 "x_7"
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_53 "x_53"
OpName %x_57 "x_57"
OpName %x_58 "x_58"
OpName %x_83 "x_83"
OpName %x_84 "x_84"
OpName %x_124 "x_124"
OpName %x_125 "x_125"
OpName %x_57_phi "x_57_phi"
OpName %x_60_phi "x_60_phi"
OpName %x_83_phi "x_83_phi"
OpName %x_84_phi "x_84_phi"
OpName %x_85_phi "x_85_phi"
OpName %x_87_phi "x_87_phi"
OpName %x_128_phi "x_128_phi"
OpName %x_135_phi "x_135_phi"
OpName %x_70 "x_70"
OpName %x_78 "x_78"
OpName %x_61 "x_61"
OpName %x_58_phi "x_58_phi"
OpName %x_77 "x_77"
OpName %x_78_phi "x_78_phi"
OpName %x_92 "x_92"
OpName %x_98 "x_98"
OpName %x_99 "x_99"
OpName %x_98_phi "x_98_phi"
OpName %x_101_phi "x_101_phi"
OpName %x_124_phi "x_124_phi"
OpName %x_125_phi "x_125_phi"
OpName %x_126_phi "x_126_phi"
OpName %x_111 "x_111"
OpName %x_119 "x_119"
OpName %x_102 "x_102"
OpName %x_99_phi "x_99_phi"
OpName %x_118 "x_118"
OpName %x_119_phi "x_119_phi"
OpName %x_136 "x_136"
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 %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 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
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %9
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_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 %9
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%22 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
%25 = OpConstantNull %float
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%36 = OpConstantNull %int
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%42 = OpConstantNull %bool
%float_7 = OpConstant %float 7
%float_8 = OpConstant %float 8
%float_9 = OpConstant %float 9
%49 = OpConstantComposite %v3float %float_7 %float_8 %float_9
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1
%float_0_125 = OpConstant %float 0.125
%float_0 = OpConstant %float 0
%float_n0_5 = OpConstant %float -0.5
%63 = OpConstantComposite %v2float %float_0 %float_n0_5
%_ptr_Private_float = OpTypePointer Private %float
%int_1 = OpConstant %int 1
%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
%true = OpConstantTrue %bool
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%int_3 = OpConstant %int 3
%main_out = OpTypeStruct %v4float
%264 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%c = OpVariable %_ptr_Function_v3float Function %22
%x_53 = OpVariable %_ptr_Function_float Function %25
%x_57 = OpVariable %_ptr_Function_float Function %25
%x_58 = OpVariable %_ptr_Function_float Function %25
%x_83 = OpVariable %_ptr_Function_float Function %25
%x_84 = OpVariable %_ptr_Function_float Function %25
%x_124 = OpVariable %_ptr_Function_float Function %25
%x_125 = OpVariable %_ptr_Function_float Function %25
%x_57_phi = OpVariable %_ptr_Function_float Function %25
%x_60_phi = OpVariable %_ptr_Function_int Function %36
%x_83_phi = OpVariable %_ptr_Function_float Function %25
%x_84_phi = OpVariable %_ptr_Function_float Function %25
%x_85_phi = OpVariable %_ptr_Function_bool Function %42
%x_87_phi = OpVariable %_ptr_Function_float Function %25
%x_128_phi = OpVariable %_ptr_Function_float Function %25
%x_135_phi = OpVariable %_ptr_Function_int Function %36
%x_70 = OpVariable %_ptr_Function_float Function %25
%x_78 = OpVariable %_ptr_Function_float Function %25
%x_61 = OpVariable %_ptr_Function_int Function %36
%x_58_phi = OpVariable %_ptr_Function_float Function %25
%x_77 = OpVariable %_ptr_Function_float Function %25
%x_78_phi = OpVariable %_ptr_Function_float Function %25
%x_92 = OpVariable %_ptr_Function_float Function %25
%x_98 = OpVariable %_ptr_Function_float Function %25
%x_99 = OpVariable %_ptr_Function_float Function %25
%x_98_phi = OpVariable %_ptr_Function_float Function %25
%x_101_phi = OpVariable %_ptr_Function_int Function %36
%x_124_phi = OpVariable %_ptr_Function_float Function %25
%x_125_phi = OpVariable %_ptr_Function_float Function %25
%x_126_phi = OpVariable %_ptr_Function_bool Function %42
%x_111 = OpVariable %_ptr_Function_float Function %25
%x_119 = OpVariable %_ptr_Function_float Function %25
%x_102 = OpVariable %_ptr_Function_int Function %36
%x_99_phi = OpVariable %_ptr_Function_float Function %25
%x_118 = OpVariable %_ptr_Function_float Function %25
%x_119_phi = OpVariable %_ptr_Function_float Function %25
%x_136 = OpVariable %_ptr_Function_int Function %36
OpStore %c %49
%53 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %uint_0
%54 = OpLoad %float %53
%56 = OpCompositeConstruct %v2float %float_1 %54
%60 = OpFMul %float %54 %float_0_125
%57 = OpExtInst %float %58 RoundEven %60
%65 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%66 = OpLoad %float %65
OpStore %x_53 %66
OpSelectionMerge %67 None
OpSwitch %uint_0 %68
%68 = OpLabel
OpStore %x_57_phi %float_n0_5
OpStore %x_60_phi %int_1
OpBranch %70
%70 = OpLabel
OpLoopMerge %71 %72 None
OpBranch %73
%73 = OpLabel
%78 = OpLoad %float %x_57_phi
OpStore %x_57 %78
%79 = OpLoad %int %x_60_phi
OpStore %x_83_phi %float_0
%80 = OpLoad %float %x_57
OpStore %x_84_phi %80
OpStore %x_85_phi %false
%83 = OpSLessThan %bool %79 %int_800
OpSelectionMerge %84 None
OpBranchConditional %83 %85 %86
%85 = OpLabel
OpBranch %84
%86 = OpLabel
OpBranch %71
%84 = OpLabel
%90 = OpSMod %int %79 %int_32
%92 = OpIEqual %bool %90 %int_0
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %95
%94 = OpLabel
%96 = OpLoad %float %x_57
%98 = OpFAdd %float %96 %float_0_400000006
OpStore %x_70 %98
%99 = OpLoad %float %x_70
OpStore %x_58_phi %99
OpBranch %93
%95 = OpLabel
%100 = OpLoad %float %x_57
OpStore %x_78_phi %100
%101 = OpConvertSToF %float %79
%102 = OpExtInst %float %58 RoundEven %57
%104 = OpConvertSToF %float %79
%105 = OpExtInst %float %58 RoundEven %57
%106 = OpFDiv %float %104 %105
%103 = OpExtInst %float %58 Floor %106
%107 = OpFMul %float %102 %103
%108 = OpFSub %float %101 %107
%110 = OpFOrdLessThanEqual %bool %108 %float_0_00999999978
OpSelectionMerge %111 None
OpBranchConditional %110 %112 %111
%112 = OpLabel
%113 = OpLoad %float %x_57
%115 = OpFAdd %float %113 %float_100
OpStore %x_77 %115
%116 = OpLoad %float %x_77
OpStore %x_78_phi %116
OpBranch %111
%111 = OpLabel
%117 = OpLoad %float %x_78_phi
OpStore %x_78 %117
%118 = OpLoad %float %x_78
OpStore %x_58_phi %118
OpBranch %93
%93 = OpLabel
%119 = OpLoad %float %x_58_phi
OpStore %x_58 %119
%120 = OpConvertSToF %float %79
%121 = OpLoad %float %x_53
%122 = OpFOrdGreaterThanEqual %bool %120 %121
OpSelectionMerge %123 None
OpBranchConditional %122 %124 %123
%124 = OpLabel
%125 = OpLoad %float %x_58
OpStore %x_83_phi %125
%126 = OpLoad %float %x_58
OpStore %x_84_phi %126
OpStore %x_85_phi %true
OpBranch %71
%123 = OpLabel
OpBranch %72
%72 = OpLabel
%128 = OpIAdd %int %79 %int_1
OpStore %x_61 %128
%129 = OpLoad %float %x_58
OpStore %x_57_phi %129
%130 = OpLoad %int %x_61
OpStore %x_60_phi %130
OpBranch %70
%71 = OpLabel
%131 = OpLoad %float %x_83_phi
OpStore %x_83 %131
%132 = OpLoad %float %x_84_phi
OpStore %x_84 %132
%133 = OpLoad %bool %x_85_phi
%134 = OpLoad %float %x_83
OpStore %x_87_phi %134
OpSelectionMerge %135 None
OpBranchConditional %133 %136 %135
%136 = OpLabel
OpBranch %67
%135 = OpLabel
%137 = OpLoad %float %x_84
OpStore %x_87_phi %137
OpBranch %67
%67 = OpLabel
%146 = OpLoad %float %x_87_phi
%147 = OpLoad %float %x_84
%148 = OpLoad %float %x_83
%149 = OpCompositeConstruct %v4float %147 %float_0_400000006 %148 %float_0_400000006
%150 = OpAccessChain %_ptr_Function_float %c %uint_0
OpStore %150 %146
%152 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%153 = OpLoad %float %152
OpStore %x_92 %153
OpSelectionMerge %154 None
OpSwitch %uint_0 %155
%155 = OpLabel
%156 = OpCompositeExtract %float %63 0
%157 = OpCompositeExtract %float %63 1
%158 = OpLoad %float %x_57
%159 = OpCompositeConstruct %v4float %156 %157 %float_0 %158
%160 = OpCompositeExtract %float %56 0
%161 = OpCompositeExtract %float %56 1
%162 = OpCompositeConstruct %v3float %160 %161 %float_n0_5
%163 = OpCompositeExtract %float %162 2
OpStore %x_98_phi %163
OpStore %x_101_phi %int_1
OpBranch %164
%164 = OpLabel
OpLoopMerge %165 %166 None
OpBranch %167
%167 = OpLabel
%172 = OpLoad %float %x_98_phi
OpStore %x_98 %172
%173 = OpLoad %int %x_101_phi
OpStore %x_124_phi %float_0
%174 = OpLoad %float %x_98
OpStore %x_125_phi %174
OpStore %x_126_phi %false
%175 = OpSLessThan %bool %173 %int_800
OpSelectionMerge %176 None
OpBranchConditional %175 %177 %178
%177 = OpLabel
OpBranch %176
%178 = OpLabel
OpBranch %165
%176 = OpLabel
%181 = OpSMod %int %173 %int_32
%182 = OpIEqual %bool %181 %int_0
OpSelectionMerge %183 None
OpBranchConditional %182 %184 %185
%184 = OpLabel
%186 = OpLoad %float %x_98
%187 = OpFAdd %float %186 %float_0_400000006
OpStore %x_111 %187
%188 = OpLoad %float %x_111
OpStore %x_99_phi %188
OpBranch %183
%185 = OpLabel
%189 = OpLoad %float %x_98
OpStore %x_119_phi %189
%190 = OpConvertSToF %float %173
%191 = OpExtInst %float %58 RoundEven %57
%193 = OpConvertSToF %float %173
%194 = OpExtInst %float %58 RoundEven %57
%195 = OpFDiv %float %193 %194
%192 = OpExtInst %float %58 Floor %195
%196 = OpFMul %float %191 %192
%197 = OpFSub %float %190 %196
%198 = OpFOrdLessThanEqual %bool %197 %float_0_00999999978
OpSelectionMerge %199 None
OpBranchConditional %198 %200 %199
%200 = OpLabel
%201 = OpLoad %float %x_98
%202 = OpFAdd %float %201 %float_100
OpStore %x_118 %202
%203 = OpLoad %float %x_118
OpStore %x_119_phi %203
OpBranch %199
%199 = OpLabel
%204 = OpLoad %float %x_119_phi
OpStore %x_119 %204
%205 = OpLoad %float %x_119
OpStore %x_99_phi %205
OpBranch %183
%183 = OpLabel
%206 = OpLoad %float %x_99_phi
OpStore %x_99 %206
%207 = OpConvertSToF %float %173
%208 = OpLoad %float %x_92
%209 = OpFOrdGreaterThanEqual %bool %207 %208
OpSelectionMerge %210 None
OpBranchConditional %209 %211 %210
%211 = OpLabel
%212 = OpLoad %float %x_99
OpStore %x_124_phi %212
%213 = OpLoad %float %x_99
OpStore %x_125_phi %213
OpStore %x_126_phi %true
OpBranch %165
%210 = OpLabel
OpBranch %166
%166 = OpLabel
%214 = OpIAdd %int %173 %int_1
OpStore %x_102 %214
%215 = OpLoad %float %x_99
OpStore %x_98_phi %215
%216 = OpLoad %int %x_102
OpStore %x_101_phi %216
OpBranch %164
%165 = OpLabel
%217 = OpLoad %float %x_124_phi
OpStore %x_124 %217
%218 = OpLoad %float %x_125_phi
OpStore %x_125 %218
%219 = OpLoad %bool %x_126_phi
%220 = OpLoad %float %x_124
OpStore %x_128_phi %220
OpSelectionMerge %221 None
OpBranchConditional %219 %222 %221
%222 = OpLabel
OpBranch %154
%221 = OpLabel
%223 = OpLoad %float %x_125
OpStore %x_128_phi %223
OpBranch %154
%154 = OpLabel
%224 = OpLoad %float %x_128_phi
%225 = OpAccessChain %_ptr_Function_float %c %uint_1
OpStore %225 %224
%226 = OpAccessChain %_ptr_Function_float %c %uint_0
%227 = OpLoad %float %226
%228 = OpAccessChain %_ptr_Function_float %c %uint_1
%229 = OpLoad %float %228
%231 = OpAccessChain %_ptr_Function_float %c %uint_2
%232 = OpFAdd %float %227 %229
OpStore %231 %232
OpStore %x_135_phi %int_0
OpBranch %233
%233 = OpLabel
OpLoopMerge %234 %235 None
OpBranch %236
%236 = OpLabel
%238 = OpLoad %int %x_135_phi
%240 = OpSLessThan %bool %238 %int_3
OpSelectionMerge %241 None
OpBranchConditional %240 %242 %243
%242 = OpLabel
OpBranch %241
%243 = OpLabel
OpBranch %234
%241 = OpLabel
%244 = OpAccessChain %_ptr_Function_float %c %238
%245 = OpLoad %float %244
%246 = OpFOrdGreaterThanEqual %bool %245 %float_1
OpSelectionMerge %247 None
OpBranchConditional %246 %248 %247
%248 = OpLabel
%249 = OpAccessChain %_ptr_Function_float %c %238
%250 = OpLoad %float %249
%251 = OpAccessChain %_ptr_Function_float %c %238
%252 = OpLoad %float %251
%253 = OpAccessChain %_ptr_Function_float %c %238
%254 = OpFMul %float %250 %252
OpStore %253 %254
OpBranch %247
%247 = OpLabel
OpBranch %235
%235 = OpLabel
%255 = OpIAdd %int %238 %int_1
OpStore %x_136 %255
%256 = OpLoad %int %x_136
OpStore %x_135_phi %256
OpBranch %233
%234 = OpLabel
%257 = OpLoad %v3float %c
%259 = OpExtInst %v3float %58 FAbs %257
%258 = OpExtInst %v3float %58 Normalize %259
%260 = OpCompositeExtract %float %258 0
%261 = OpCompositeExtract %float %258 1
%262 = OpCompositeExtract %float %258 2
%263 = OpCompositeConstruct %v4float %260 %261 %262 %float_1
OpStore %x_GLF_color %263
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %264
%tint_symbol_1 = OpFunctionParameter %main_out
%268 = OpLabel
%269 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %269
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%271 = OpLabel
%272 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %272
%273 = OpFunctionCall %void %main_1
%275 = OpLoad %v4float %x_GLF_color
%276 = OpCompositeConstruct %main_out %275
%274 = OpFunctionCall %void %tint_symbol_3 %276
OpReturn
OpFunctionEnd