• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1OpCapability Shader
2%1 = OpExtInstImport "GLSL.std.450"
3OpMemoryModel Logical GLSL450
4OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor %sk_Clockwise
5OpExecutionMode %_entrypoint_v OriginUpperLeft
6OpName %sk_FragColor "sk_FragColor"
7OpName %sk_Clockwise "sk_Clockwise"
8OpName %_UniformBuffer "_UniformBuffer"
9OpMemberName %_UniformBuffer 0 "colorRed"
10OpMemberName %_UniformBuffer 1 "colorGreen"
11OpName %_entrypoint_v "_entrypoint_v"
12OpName %S "S"
13OpMemberName %S 0 "x"
14OpMemberName %S 1 "y"
15OpName %returns_a_struct_S "returns_a_struct_S"
16OpName %s "s"
17OpName %constructs_a_struct_S "constructs_a_struct_S"
18OpName %accepts_a_struct_fS "accepts_a_struct_fS"
19OpName %modifies_a_struct_vS "modifies_a_struct_vS"
20OpName %main "main"
21OpName %s_0 "s"
22OpName %x "x"
23OpName %expected "expected"
24OpName %Nested "Nested"
25OpMemberName %Nested 0 "a"
26OpMemberName %Nested 1 "b"
27OpName %n1 "n1"
28OpName %n2 "n2"
29OpName %n3 "n3"
30OpName %Compound "Compound"
31OpMemberName %Compound 0 "f4"
32OpMemberName %Compound 1 "i3"
33OpName %c1 "c1"
34OpName %c2 "c2"
35OpName %c3 "c3"
36OpName %valid "valid"
37OpDecorate %sk_FragColor RelaxedPrecision
38OpDecorate %sk_FragColor Location 0
39OpDecorate %sk_FragColor Index 0
40OpDecorate %sk_Clockwise BuiltIn FrontFacing
41OpMemberDecorate %_UniformBuffer 0 Offset 0
42OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
43OpMemberDecorate %_UniformBuffer 1 Offset 16
44OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
45OpDecorate %_UniformBuffer Block
46OpDecorate %14 Binding 0
47OpDecorate %14 DescriptorSet 0
48OpMemberDecorate %S 0 Offset 0
49OpMemberDecorate %S 1 Offset 4
50OpDecorate %41 RelaxedPrecision
51OpDecorate %70 RelaxedPrecision
52OpMemberDecorate %Nested 0 Offset 0
53OpMemberDecorate %Nested 0 RelaxedPrecision
54OpMemberDecorate %Nested 1 Offset 16
55OpMemberDecorate %Nested 1 RelaxedPrecision
56OpDecorate %84 RelaxedPrecision
57OpDecorate %86 RelaxedPrecision
58OpDecorate %87 RelaxedPrecision
59OpDecorate %89 RelaxedPrecision
60OpMemberDecorate %Compound 0 Offset 0
61OpMemberDecorate %Compound 1 Offset 16
62OpDecorate %108 RelaxedPrecision
63OpDecorate %109 RelaxedPrecision
64OpDecorate %114 RelaxedPrecision
65OpDecorate %115 RelaxedPrecision
66OpDecorate %137 RelaxedPrecision
67OpDecorate %138 RelaxedPrecision
68OpDecorate %149 RelaxedPrecision
69OpDecorate %161 RelaxedPrecision
70OpDecorate %173 RelaxedPrecision
71OpDecorate %174 RelaxedPrecision
72OpDecorate %197 RelaxedPrecision
73OpDecorate %198 RelaxedPrecision
74OpDecorate %221 RelaxedPrecision
75OpDecorate %247 RelaxedPrecision
76OpDecorate %248 RelaxedPrecision
77OpDecorate %263 RelaxedPrecision
78OpDecorate %264 RelaxedPrecision
79OpDecorate %275 RelaxedPrecision
80OpDecorate %282 RelaxedPrecision
81OpDecorate %284 RelaxedPrecision
82OpDecorate %285 RelaxedPrecision
83%float = OpTypeFloat 32
84%v4float = OpTypeVector %float 4
85%_ptr_Output_v4float = OpTypePointer Output %v4float
86%sk_FragColor = OpVariable %_ptr_Output_v4float Output
87%bool = OpTypeBool
88%_ptr_Input_bool = OpTypePointer Input %bool
89%sk_Clockwise = OpVariable %_ptr_Input_bool Input
90%_UniformBuffer = OpTypeStruct %v4float %v4float
91%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
92%14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
93%void = OpTypeVoid
94%19 = OpTypeFunction %void
95%v2float = OpTypeVector %float 2
96%float_0 = OpConstant %float 0
97%23 = OpConstantComposite %v2float %float_0 %float_0
98%_ptr_Function_v2float = OpTypePointer Function %v2float
99%int = OpTypeInt 32 1
100%S = OpTypeStruct %float %int
101%29 = OpTypeFunction %S
102%_ptr_Function_S = OpTypePointer Function %S
103%float_1 = OpConstant %float 1
104%int_0 = OpConstant %int 0
105%_ptr_Function_float = OpTypePointer Function %float
106%int_2 = OpConstant %int 2
107%int_1 = OpConstant %int 1
108%_ptr_Function_int = OpTypePointer Function %int
109%float_2 = OpConstant %float 2
110%int_3 = OpConstant %int 3
111%46 = OpTypeFunction %float %_ptr_Function_S
112%55 = OpTypeFunction %void %_ptr_Function_S
113%64 = OpTypeFunction %v4float %_ptr_Function_v2float
114%Nested = OpTypeStruct %S %S
115%_ptr_Function_Nested = OpTypePointer Function %Nested
116%v3int = OpTypeVector %int 3
117%Compound = OpTypeStruct %v4float %v3int
118%_ptr_Function_Compound = OpTypePointer Function %Compound
119%float_3 = OpConstant %float 3
120%float_4 = OpConstant %float 4
121%99 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
122%int_5 = OpConstant %int 5
123%int_6 = OpConstant %int 6
124%int_7 = OpConstant %int 7
125%103 = OpConstantComposite %v3int %int_5 %int_6 %int_7
126%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
127%_ptr_Function_bool = OpTypePointer Function %bool
128%false = OpConstantFalse %bool
129%v4bool = OpTypeVector %bool 4
130%v3bool = OpTypeVector %bool 3
131%_ptr_Function_v4float = OpTypePointer Function %v4float
132%_entrypoint_v = OpFunction %void None %19
133%20 = OpLabel
134%24 = OpVariable %_ptr_Function_v2float Function
135OpStore %24 %23
136%26 = OpFunctionCall %v4float %main %24
137OpStore %sk_FragColor %26
138OpReturn
139OpFunctionEnd
140%returns_a_struct_S = OpFunction %S None %29
141%30 = OpLabel
142%s = OpVariable %_ptr_Function_S Function
143%35 = OpAccessChain %_ptr_Function_float %s %int_0
144OpStore %35 %float_1
145%39 = OpAccessChain %_ptr_Function_int %s %int_1
146OpStore %39 %int_2
147%41 = OpLoad %S %s
148OpReturnValue %41
149OpFunctionEnd
150%constructs_a_struct_S = OpFunction %S None %29
151%42 = OpLabel
152%45 = OpCompositeConstruct %S %float_2 %int_3
153OpReturnValue %45
154OpFunctionEnd
155%accepts_a_struct_fS = OpFunction %float None %46
156%47 = OpFunctionParameter %_ptr_Function_S
157%48 = OpLabel
158%49 = OpAccessChain %_ptr_Function_float %47 %int_0
159%50 = OpLoad %float %49
160%51 = OpAccessChain %_ptr_Function_int %47 %int_1
161%52 = OpLoad %int %51
162%53 = OpConvertSToF %float %52
163%54 = OpFAdd %float %50 %53
164OpReturnValue %54
165OpFunctionEnd
166%modifies_a_struct_vS = OpFunction %void None %55
167%56 = OpFunctionParameter %_ptr_Function_S
168%57 = OpLabel
169%58 = OpAccessChain %_ptr_Function_float %56 %int_0
170%59 = OpLoad %float %58
171%60 = OpFAdd %float %59 %float_1
172OpStore %58 %60
173%61 = OpAccessChain %_ptr_Function_int %56 %int_1
174%62 = OpLoad %int %61
175%63 = OpIAdd %int %62 %int_1
176OpStore %61 %63
177OpReturn
178OpFunctionEnd
179%main = OpFunction %v4float None %64
180%65 = OpFunctionParameter %_ptr_Function_v2float
181%66 = OpLabel
182%s_0 = OpVariable %_ptr_Function_S Function
183%x = OpVariable %_ptr_Function_float Function
184%71 = OpVariable %_ptr_Function_S Function
185%expected = OpVariable %_ptr_Function_S Function
186%n1 = OpVariable %_ptr_Function_Nested Function
187%n2 = OpVariable %_ptr_Function_Nested Function
188%n3 = OpVariable %_ptr_Function_Nested Function
189%90 = OpVariable %_ptr_Function_S Function
190%c1 = OpVariable %_ptr_Function_Compound Function
191%c2 = OpVariable %_ptr_Function_Compound Function
192%c3 = OpVariable %_ptr_Function_Compound Function
193%valid = OpVariable %_ptr_Function_bool Function
194%276 = OpVariable %_ptr_Function_v4float Function
195%68 = OpFunctionCall %S %returns_a_struct_S
196OpStore %s_0 %68
197%70 = OpLoad %S %s_0
198OpStore %71 %70
199%72 = OpFunctionCall %float %accepts_a_struct_fS %71
200OpStore %x %72
201%73 = OpFunctionCall %void %modifies_a_struct_vS %s_0
202%75 = OpFunctionCall %S %constructs_a_struct_S
203OpStore %expected %75
204%81 = OpFunctionCall %S %returns_a_struct_S
205%82 = OpAccessChain %_ptr_Function_S %n1 %int_0
206OpStore %82 %81
207%83 = OpAccessChain %_ptr_Function_S %n1 %int_0
208%84 = OpLoad %S %83
209%85 = OpAccessChain %_ptr_Function_S %n1 %int_1
210OpStore %85 %84
211%86 = OpLoad %Nested %n1
212OpStore %n2 %86
213%87 = OpLoad %Nested %n2
214OpStore %n3 %87
215%88 = OpAccessChain %_ptr_Function_S %n3 %int_1
216%89 = OpLoad %S %88
217OpStore %90 %89
218%91 = OpFunctionCall %void %modifies_a_struct_vS %90
219%92 = OpLoad %S %90
220OpStore %88 %92
221%104 = OpCompositeConstruct %Compound %99 %103
222OpStore %c1 %104
223%106 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
224%108 = OpLoad %v4float %106
225%109 = OpCompositeExtract %float %108 1
226%110 = OpCompositeConstruct %v4float %109 %float_2 %float_3 %float_4
227%111 = OpCompositeConstruct %Compound %110 %103
228OpStore %c2 %111
229%113 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
230%114 = OpLoad %v4float %113
231%115 = OpCompositeExtract %float %114 0
232%116 = OpCompositeConstruct %v4float %115 %float_2 %float_3 %float_4
233%117 = OpCompositeConstruct %Compound %116 %103
234OpStore %c3 %117
235%121 = OpLoad %float %x
236%122 = OpFOrdEqual %bool %121 %float_3
237OpSelectionMerge %124 None
238OpBranchConditional %122 %123 %124
239%123 = OpLabel
240%125 = OpAccessChain %_ptr_Function_float %s_0 %int_0
241%126 = OpLoad %float %125
242%127 = OpFOrdEqual %bool %126 %float_2
243OpBranch %124
244%124 = OpLabel
245%128 = OpPhi %bool %false %66 %127 %123
246OpSelectionMerge %130 None
247OpBranchConditional %128 %129 %130
248%129 = OpLabel
249%131 = OpAccessChain %_ptr_Function_int %s_0 %int_1
250%132 = OpLoad %int %131
251%133 = OpIEqual %bool %132 %int_3
252OpBranch %130
253%130 = OpLabel
254%134 = OpPhi %bool %false %124 %133 %129
255OpSelectionMerge %136 None
256OpBranchConditional %134 %135 %136
257%135 = OpLabel
258%137 = OpLoad %S %s_0
259%138 = OpLoad %S %expected
260%139 = OpCompositeExtract %float %137 0
261%140 = OpCompositeExtract %float %138 0
262%141 = OpFOrdEqual %bool %139 %140
263%142 = OpCompositeExtract %int %137 1
264%143 = OpCompositeExtract %int %138 1
265%144 = OpIEqual %bool %142 %143
266%145 = OpLogicalAnd %bool %144 %141
267OpBranch %136
268%136 = OpLabel
269%146 = OpPhi %bool %false %130 %145 %135
270OpSelectionMerge %148 None
271OpBranchConditional %146 %147 %148
272%147 = OpLabel
273%149 = OpLoad %S %s_0
274%150 = OpCompositeConstruct %S %float_2 %int_3
275%151 = OpCompositeExtract %float %149 0
276%152 = OpCompositeExtract %float %150 0
277%153 = OpFOrdEqual %bool %151 %152
278%154 = OpCompositeExtract %int %149 1
279%155 = OpCompositeExtract %int %150 1
280%156 = OpIEqual %bool %154 %155
281%157 = OpLogicalAnd %bool %156 %153
282OpBranch %148
283%148 = OpLabel
284%158 = OpPhi %bool %false %136 %157 %147
285OpSelectionMerge %160 None
286OpBranchConditional %158 %159 %160
287%159 = OpLabel
288%161 = OpLoad %S %s_0
289%162 = OpFunctionCall %S %returns_a_struct_S
290%163 = OpCompositeExtract %float %161 0
291%164 = OpCompositeExtract %float %162 0
292%165 = OpFOrdNotEqual %bool %163 %164
293%166 = OpCompositeExtract %int %161 1
294%167 = OpCompositeExtract %int %162 1
295%168 = OpINotEqual %bool %166 %167
296%169 = OpLogicalOr %bool %168 %165
297OpBranch %160
298%160 = OpLabel
299%170 = OpPhi %bool %false %148 %169 %159
300OpSelectionMerge %172 None
301OpBranchConditional %170 %171 %172
302%171 = OpLabel
303%173 = OpLoad %Nested %n1
304%174 = OpLoad %Nested %n2
305%175 = OpCompositeExtract %S %173 0
306%176 = OpCompositeExtract %S %174 0
307%177 = OpCompositeExtract %float %175 0
308%178 = OpCompositeExtract %float %176 0
309%179 = OpFOrdEqual %bool %177 %178
310%180 = OpCompositeExtract %int %175 1
311%181 = OpCompositeExtract %int %176 1
312%182 = OpIEqual %bool %180 %181
313%183 = OpLogicalAnd %bool %182 %179
314%184 = OpCompositeExtract %S %173 1
315%185 = OpCompositeExtract %S %174 1
316%186 = OpCompositeExtract %float %184 0
317%187 = OpCompositeExtract %float %185 0
318%188 = OpFOrdEqual %bool %186 %187
319%189 = OpCompositeExtract %int %184 1
320%190 = OpCompositeExtract %int %185 1
321%191 = OpIEqual %bool %189 %190
322%192 = OpLogicalAnd %bool %191 %188
323%193 = OpLogicalAnd %bool %192 %183
324OpBranch %172
325%172 = OpLabel
326%194 = OpPhi %bool %false %160 %193 %171
327OpSelectionMerge %196 None
328OpBranchConditional %194 %195 %196
329%195 = OpLabel
330%197 = OpLoad %Nested %n1
331%198 = OpLoad %Nested %n3
332%199 = OpCompositeExtract %S %197 0
333%200 = OpCompositeExtract %S %198 0
334%201 = OpCompositeExtract %float %199 0
335%202 = OpCompositeExtract %float %200 0
336%203 = OpFOrdNotEqual %bool %201 %202
337%204 = OpCompositeExtract %int %199 1
338%205 = OpCompositeExtract %int %200 1
339%206 = OpINotEqual %bool %204 %205
340%207 = OpLogicalOr %bool %206 %203
341%208 = OpCompositeExtract %S %197 1
342%209 = OpCompositeExtract %S %198 1
343%210 = OpCompositeExtract %float %208 0
344%211 = OpCompositeExtract %float %209 0
345%212 = OpFOrdNotEqual %bool %210 %211
346%213 = OpCompositeExtract %int %208 1
347%214 = OpCompositeExtract %int %209 1
348%215 = OpINotEqual %bool %213 %214
349%216 = OpLogicalOr %bool %215 %212
350%217 = OpLogicalOr %bool %216 %207
351OpBranch %196
352%196 = OpLabel
353%218 = OpPhi %bool %false %172 %217 %195
354OpSelectionMerge %220 None
355OpBranchConditional %218 %219 %220
356%219 = OpLabel
357%221 = OpLoad %Nested %n3
358%222 = OpCompositeConstruct %S %float_1 %int_2
359%223 = OpCompositeConstruct %S %float_2 %int_3
360%224 = OpCompositeConstruct %Nested %222 %223
361%225 = OpCompositeExtract %S %221 0
362%226 = OpCompositeExtract %S %224 0
363%227 = OpCompositeExtract %float %225 0
364%228 = OpCompositeExtract %float %226 0
365%229 = OpFOrdEqual %bool %227 %228
366%230 = OpCompositeExtract %int %225 1
367%231 = OpCompositeExtract %int %226 1
368%232 = OpIEqual %bool %230 %231
369%233 = OpLogicalAnd %bool %232 %229
370%234 = OpCompositeExtract %S %221 1
371%235 = OpCompositeExtract %S %224 1
372%236 = OpCompositeExtract %float %234 0
373%237 = OpCompositeExtract %float %235 0
374%238 = OpFOrdEqual %bool %236 %237
375%239 = OpCompositeExtract %int %234 1
376%240 = OpCompositeExtract %int %235 1
377%241 = OpIEqual %bool %239 %240
378%242 = OpLogicalAnd %bool %241 %238
379%243 = OpLogicalAnd %bool %242 %233
380OpBranch %220
381%220 = OpLabel
382%244 = OpPhi %bool %false %196 %243 %219
383OpSelectionMerge %246 None
384OpBranchConditional %244 %245 %246
385%245 = OpLabel
386%247 = OpLoad %Compound %c1
387%248 = OpLoad %Compound %c2
388%249 = OpCompositeExtract %v4float %247 0
389%250 = OpCompositeExtract %v4float %248 0
390%251 = OpFOrdEqual %v4bool %249 %250
391%253 = OpAll %bool %251
392%254 = OpCompositeExtract %v3int %247 1
393%255 = OpCompositeExtract %v3int %248 1
394%256 = OpIEqual %v3bool %254 %255
395%258 = OpAll %bool %256
396%259 = OpLogicalAnd %bool %258 %253
397OpBranch %246
398%246 = OpLabel
399%260 = OpPhi %bool %false %220 %259 %245
400OpSelectionMerge %262 None
401OpBranchConditional %260 %261 %262
402%261 = OpLabel
403%263 = OpLoad %Compound %c2
404%264 = OpLoad %Compound %c3
405%265 = OpCompositeExtract %v4float %263 0
406%266 = OpCompositeExtract %v4float %264 0
407%267 = OpFOrdNotEqual %v4bool %265 %266
408%268 = OpAny %bool %267
409%269 = OpCompositeExtract %v3int %263 1
410%270 = OpCompositeExtract %v3int %264 1
411%271 = OpINotEqual %v3bool %269 %270
412%272 = OpAny %bool %271
413%273 = OpLogicalOr %bool %272 %268
414OpBranch %262
415%262 = OpLabel
416%274 = OpPhi %bool %false %246 %273 %261
417OpStore %valid %274
418%275 = OpLoad %bool %valid
419OpSelectionMerge %280 None
420OpBranchConditional %275 %278 %279
421%278 = OpLabel
422%281 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
423%282 = OpLoad %v4float %281
424OpStore %276 %282
425OpBranch %280
426%279 = OpLabel
427%283 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0
428%284 = OpLoad %v4float %283
429OpStore %276 %284
430OpBranch %280
431%280 = OpLabel
432%285 = OpLoad %v4float %276
433OpReturnValue %285
434OpFunctionEnd
435