• 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 %valid "valid"
31OpDecorate %sk_FragColor RelaxedPrecision
32OpDecorate %sk_FragColor Location 0
33OpDecorate %sk_FragColor Index 0
34OpDecorate %sk_Clockwise BuiltIn FrontFacing
35OpMemberDecorate %_UniformBuffer 0 Offset 0
36OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
37OpMemberDecorate %_UniformBuffer 1 Offset 16
38OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
39OpDecorate %_UniformBuffer Block
40OpDecorate %14 Binding 0
41OpDecorate %14 DescriptorSet 0
42OpMemberDecorate %S 0 Offset 0
43OpMemberDecorate %S 1 Offset 4
44OpDecorate %41 RelaxedPrecision
45OpDecorate %70 RelaxedPrecision
46OpMemberDecorate %Nested 0 Offset 0
47OpMemberDecorate %Nested 0 RelaxedPrecision
48OpMemberDecorate %Nested 1 Offset 16
49OpMemberDecorate %Nested 1 RelaxedPrecision
50OpDecorate %84 RelaxedPrecision
51OpDecorate %86 RelaxedPrecision
52OpDecorate %87 RelaxedPrecision
53OpDecorate %89 RelaxedPrecision
54OpDecorate %113 RelaxedPrecision
55OpDecorate %114 RelaxedPrecision
56OpDecorate %125 RelaxedPrecision
57OpDecorate %137 RelaxedPrecision
58OpDecorate %149 RelaxedPrecision
59OpDecorate %150 RelaxedPrecision
60OpDecorate %173 RelaxedPrecision
61OpDecorate %174 RelaxedPrecision
62OpDecorate %197 RelaxedPrecision
63OpDecorate %221 RelaxedPrecision
64OpDecorate %229 RelaxedPrecision
65OpDecorate %231 RelaxedPrecision
66OpDecorate %232 RelaxedPrecision
67%float = OpTypeFloat 32
68%v4float = OpTypeVector %float 4
69%_ptr_Output_v4float = OpTypePointer Output %v4float
70%sk_FragColor = OpVariable %_ptr_Output_v4float Output
71%bool = OpTypeBool
72%_ptr_Input_bool = OpTypePointer Input %bool
73%sk_Clockwise = OpVariable %_ptr_Input_bool Input
74%_UniformBuffer = OpTypeStruct %v4float %v4float
75%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
76%14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
77%void = OpTypeVoid
78%19 = OpTypeFunction %void
79%v2float = OpTypeVector %float 2
80%float_0 = OpConstant %float 0
81%23 = OpConstantComposite %v2float %float_0 %float_0
82%_ptr_Function_v2float = OpTypePointer Function %v2float
83%int = OpTypeInt 32 1
84%S = OpTypeStruct %float %int
85%29 = OpTypeFunction %S
86%_ptr_Function_S = OpTypePointer Function %S
87%float_1 = OpConstant %float 1
88%int_0 = OpConstant %int 0
89%_ptr_Function_float = OpTypePointer Function %float
90%int_2 = OpConstant %int 2
91%int_1 = OpConstant %int 1
92%_ptr_Function_int = OpTypePointer Function %int
93%float_2 = OpConstant %float 2
94%int_3 = OpConstant %int 3
95%46 = OpTypeFunction %float %_ptr_Function_S
96%55 = OpTypeFunction %void %_ptr_Function_S
97%64 = OpTypeFunction %v4float %_ptr_Function_v2float
98%Nested = OpTypeStruct %S %S
99%_ptr_Function_Nested = OpTypePointer Function %Nested
100%_ptr_Function_bool = OpTypePointer Function %bool
101%false = OpConstantFalse %bool
102%float_3 = OpConstant %float 3
103%_ptr_Function_v4float = OpTypePointer Function %v4float
104%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
105%_entrypoint_v = OpFunction %void None %19
106%20 = OpLabel
107%24 = OpVariable %_ptr_Function_v2float Function
108OpStore %24 %23
109%26 = OpFunctionCall %v4float %main %24
110OpStore %sk_FragColor %26
111OpReturn
112OpFunctionEnd
113%returns_a_struct_S = OpFunction %S None %29
114%30 = OpLabel
115%s = OpVariable %_ptr_Function_S Function
116%35 = OpAccessChain %_ptr_Function_float %s %int_0
117OpStore %35 %float_1
118%39 = OpAccessChain %_ptr_Function_int %s %int_1
119OpStore %39 %int_2
120%41 = OpLoad %S %s
121OpReturnValue %41
122OpFunctionEnd
123%constructs_a_struct_S = OpFunction %S None %29
124%42 = OpLabel
125%45 = OpCompositeConstruct %S %float_2 %int_3
126OpReturnValue %45
127OpFunctionEnd
128%accepts_a_struct_fS = OpFunction %float None %46
129%47 = OpFunctionParameter %_ptr_Function_S
130%48 = OpLabel
131%49 = OpAccessChain %_ptr_Function_float %47 %int_0
132%50 = OpLoad %float %49
133%51 = OpAccessChain %_ptr_Function_int %47 %int_1
134%52 = OpLoad %int %51
135%53 = OpConvertSToF %float %52
136%54 = OpFAdd %float %50 %53
137OpReturnValue %54
138OpFunctionEnd
139%modifies_a_struct_vS = OpFunction %void None %55
140%56 = OpFunctionParameter %_ptr_Function_S
141%57 = OpLabel
142%58 = OpAccessChain %_ptr_Function_float %56 %int_0
143%59 = OpLoad %float %58
144%60 = OpFAdd %float %59 %float_1
145OpStore %58 %60
146%61 = OpAccessChain %_ptr_Function_int %56 %int_1
147%62 = OpLoad %int %61
148%63 = OpIAdd %int %62 %int_1
149OpStore %61 %63
150OpReturn
151OpFunctionEnd
152%main = OpFunction %v4float None %64
153%65 = OpFunctionParameter %_ptr_Function_v2float
154%66 = OpLabel
155%s_0 = OpVariable %_ptr_Function_S Function
156%x = OpVariable %_ptr_Function_float Function
157%71 = OpVariable %_ptr_Function_S Function
158%expected = OpVariable %_ptr_Function_S Function
159%n1 = OpVariable %_ptr_Function_Nested Function
160%n2 = OpVariable %_ptr_Function_Nested Function
161%n3 = OpVariable %_ptr_Function_Nested Function
162%90 = OpVariable %_ptr_Function_S Function
163%valid = OpVariable %_ptr_Function_bool Function
164%222 = OpVariable %_ptr_Function_v4float Function
165%68 = OpFunctionCall %S %returns_a_struct_S
166OpStore %s_0 %68
167%70 = OpLoad %S %s_0
168OpStore %71 %70
169%72 = OpFunctionCall %float %accepts_a_struct_fS %71
170OpStore %x %72
171%73 = OpFunctionCall %void %modifies_a_struct_vS %s_0
172%75 = OpFunctionCall %S %constructs_a_struct_S
173OpStore %expected %75
174%81 = OpFunctionCall %S %returns_a_struct_S
175%82 = OpAccessChain %_ptr_Function_S %n1 %int_0
176OpStore %82 %81
177%83 = OpAccessChain %_ptr_Function_S %n1 %int_0
178%84 = OpLoad %S %83
179%85 = OpAccessChain %_ptr_Function_S %n1 %int_1
180OpStore %85 %84
181%86 = OpLoad %Nested %n1
182OpStore %n2 %86
183%87 = OpLoad %Nested %n2
184OpStore %n3 %87
185%88 = OpAccessChain %_ptr_Function_S %n3 %int_1
186%89 = OpLoad %S %88
187OpStore %90 %89
188%91 = OpFunctionCall %void %modifies_a_struct_vS %90
189%92 = OpLoad %S %90
190OpStore %88 %92
191%96 = OpLoad %float %x
192%98 = OpFOrdEqual %bool %96 %float_3
193OpSelectionMerge %100 None
194OpBranchConditional %98 %99 %100
195%99 = OpLabel
196%101 = OpAccessChain %_ptr_Function_float %s_0 %int_0
197%102 = OpLoad %float %101
198%103 = OpFOrdEqual %bool %102 %float_2
199OpBranch %100
200%100 = OpLabel
201%104 = OpPhi %bool %false %66 %103 %99
202OpSelectionMerge %106 None
203OpBranchConditional %104 %105 %106
204%105 = OpLabel
205%107 = OpAccessChain %_ptr_Function_int %s_0 %int_1
206%108 = OpLoad %int %107
207%109 = OpIEqual %bool %108 %int_3
208OpBranch %106
209%106 = OpLabel
210%110 = OpPhi %bool %false %100 %109 %105
211OpSelectionMerge %112 None
212OpBranchConditional %110 %111 %112
213%111 = OpLabel
214%113 = OpLoad %S %s_0
215%114 = OpLoad %S %expected
216%115 = OpCompositeExtract %float %113 0
217%116 = OpCompositeExtract %float %114 0
218%117 = OpFOrdEqual %bool %115 %116
219%118 = OpCompositeExtract %int %113 1
220%119 = OpCompositeExtract %int %114 1
221%120 = OpIEqual %bool %118 %119
222%121 = OpLogicalAnd %bool %120 %117
223OpBranch %112
224%112 = OpLabel
225%122 = OpPhi %bool %false %106 %121 %111
226OpSelectionMerge %124 None
227OpBranchConditional %122 %123 %124
228%123 = OpLabel
229%125 = OpLoad %S %s_0
230%126 = OpCompositeConstruct %S %float_2 %int_3
231%127 = OpCompositeExtract %float %125 0
232%128 = OpCompositeExtract %float %126 0
233%129 = OpFOrdEqual %bool %127 %128
234%130 = OpCompositeExtract %int %125 1
235%131 = OpCompositeExtract %int %126 1
236%132 = OpIEqual %bool %130 %131
237%133 = OpLogicalAnd %bool %132 %129
238OpBranch %124
239%124 = OpLabel
240%134 = OpPhi %bool %false %112 %133 %123
241OpSelectionMerge %136 None
242OpBranchConditional %134 %135 %136
243%135 = OpLabel
244%137 = OpLoad %S %s_0
245%138 = OpFunctionCall %S %returns_a_struct_S
246%139 = OpCompositeExtract %float %137 0
247%140 = OpCompositeExtract %float %138 0
248%141 = OpFOrdNotEqual %bool %139 %140
249%142 = OpCompositeExtract %int %137 1
250%143 = OpCompositeExtract %int %138 1
251%144 = OpINotEqual %bool %142 %143
252%145 = OpLogicalOr %bool %144 %141
253OpBranch %136
254%136 = OpLabel
255%146 = OpPhi %bool %false %124 %145 %135
256OpSelectionMerge %148 None
257OpBranchConditional %146 %147 %148
258%147 = OpLabel
259%149 = OpLoad %Nested %n1
260%150 = OpLoad %Nested %n2
261%151 = OpCompositeExtract %S %149 0
262%152 = OpCompositeExtract %S %150 0
263%153 = OpCompositeExtract %float %151 0
264%154 = OpCompositeExtract %float %152 0
265%155 = OpFOrdEqual %bool %153 %154
266%156 = OpCompositeExtract %int %151 1
267%157 = OpCompositeExtract %int %152 1
268%158 = OpIEqual %bool %156 %157
269%159 = OpLogicalAnd %bool %158 %155
270%160 = OpCompositeExtract %S %149 1
271%161 = OpCompositeExtract %S %150 1
272%162 = OpCompositeExtract %float %160 0
273%163 = OpCompositeExtract %float %161 0
274%164 = OpFOrdEqual %bool %162 %163
275%165 = OpCompositeExtract %int %160 1
276%166 = OpCompositeExtract %int %161 1
277%167 = OpIEqual %bool %165 %166
278%168 = OpLogicalAnd %bool %167 %164
279%169 = OpLogicalAnd %bool %168 %159
280OpBranch %148
281%148 = OpLabel
282%170 = OpPhi %bool %false %136 %169 %147
283OpSelectionMerge %172 None
284OpBranchConditional %170 %171 %172
285%171 = OpLabel
286%173 = OpLoad %Nested %n1
287%174 = OpLoad %Nested %n3
288%175 = OpCompositeExtract %S %173 0
289%176 = OpCompositeExtract %S %174 0
290%177 = OpCompositeExtract %float %175 0
291%178 = OpCompositeExtract %float %176 0
292%179 = OpFOrdNotEqual %bool %177 %178
293%180 = OpCompositeExtract %int %175 1
294%181 = OpCompositeExtract %int %176 1
295%182 = OpINotEqual %bool %180 %181
296%183 = OpLogicalOr %bool %182 %179
297%184 = OpCompositeExtract %S %173 1
298%185 = OpCompositeExtract %S %174 1
299%186 = OpCompositeExtract %float %184 0
300%187 = OpCompositeExtract %float %185 0
301%188 = OpFOrdNotEqual %bool %186 %187
302%189 = OpCompositeExtract %int %184 1
303%190 = OpCompositeExtract %int %185 1
304%191 = OpINotEqual %bool %189 %190
305%192 = OpLogicalOr %bool %191 %188
306%193 = OpLogicalOr %bool %192 %183
307OpBranch %172
308%172 = OpLabel
309%194 = OpPhi %bool %false %148 %193 %171
310OpSelectionMerge %196 None
311OpBranchConditional %194 %195 %196
312%195 = OpLabel
313%197 = OpLoad %Nested %n3
314%198 = OpCompositeConstruct %S %float_1 %int_2
315%199 = OpCompositeConstruct %S %float_2 %int_3
316%200 = OpCompositeConstruct %Nested %198 %199
317%201 = OpCompositeExtract %S %197 0
318%202 = OpCompositeExtract %S %200 0
319%203 = OpCompositeExtract %float %201 0
320%204 = OpCompositeExtract %float %202 0
321%205 = OpFOrdEqual %bool %203 %204
322%206 = OpCompositeExtract %int %201 1
323%207 = OpCompositeExtract %int %202 1
324%208 = OpIEqual %bool %206 %207
325%209 = OpLogicalAnd %bool %208 %205
326%210 = OpCompositeExtract %S %197 1
327%211 = OpCompositeExtract %S %200 1
328%212 = OpCompositeExtract %float %210 0
329%213 = OpCompositeExtract %float %211 0
330%214 = OpFOrdEqual %bool %212 %213
331%215 = OpCompositeExtract %int %210 1
332%216 = OpCompositeExtract %int %211 1
333%217 = OpIEqual %bool %215 %216
334%218 = OpLogicalAnd %bool %217 %214
335%219 = OpLogicalAnd %bool %218 %209
336OpBranch %196
337%196 = OpLabel
338%220 = OpPhi %bool %false %172 %219 %195
339OpStore %valid %220
340%221 = OpLoad %bool %valid
341OpSelectionMerge %226 None
342OpBranchConditional %221 %224 %225
343%224 = OpLabel
344%227 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
345%229 = OpLoad %v4float %227
346OpStore %222 %229
347OpBranch %226
348%225 = OpLabel
349%230 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0
350%231 = OpLoad %v4float %230
351OpStore %222 %231
352OpBranch %226
353%226 = OpLabel
354%232 = OpLoad %v4float %222
355OpReturnValue %232
356OpFunctionEnd
357