d3049ec7e416b01794eb47fd7b30a016563fb00c
[platform/upstream/glslang.git] / Test / baseResults / hlsl.nonstaticMemberFunction.frag.out
1 hlsl.nonstaticMemberFunction.frag
2 Shader version: 450
3 gl_FragCoord origin is upper left
4 0:? Sequence
5 0:1  Sequence
6 0:1    move second child to first child ( temp 2-component vector of float)
7 0:1      'i' ( global 2-component vector of float)
8 0:?       Constant:
9 0:?         1.000000
10 0:?         2.000000
11 0:5  Function Definition: type1::setmem(vf4; ( temp void)
12 0:5    Function Parameters: 
13 0:5      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
14 0:5      'm' ( in 4-component vector of float)
15 0:?     Sequence
16 0:5      move second child to first child ( temp 4-component vector of float)
17 0:5        memVar: direct index for structure ( temp 4-component vector of float)
18 0:5          '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
19 0:5          Constant:
20 0:5            0 (const uint)
21 0:5        'm' ( in 4-component vector of float)
22 0:6  Function Definition: type1::seti(i1; ( temp void)
23 0:6    Function Parameters: 
24 0:6      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
25 0:6      'si' ( in int)
26 0:?     Sequence
27 0:6      move second child to first child ( temp int)
28 0:6        i: direct index for structure ( temp int)
29 0:6          '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
30 0:6          Constant:
31 0:6            1 (const uint)
32 0:6        'si' ( in int)
33 0:9  Function Definition: type1::memFun(vf4; ( temp 4-component vector of float)
34 0:9    Function Parameters: 
35 0:9      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
36 0:9      'a' ( in 4-component vector of float)
37 0:?     Sequence
38 0:10      Branch: Return with expression
39 0:10        add ( temp 4-component vector of float)
40 0:10          vector-scale ( temp 4-component vector of float)
41 0:10            Convert int to float ( temp float)
42 0:10              i: direct index for structure ( temp int)
43 0:10                '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
44 0:10                Constant:
45 0:10                  1 (const uint)
46 0:10            'a' ( in 4-component vector of float)
47 0:10          memVar: direct index for structure ( temp 4-component vector of float)
48 0:10            '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
49 0:10            Constant:
50 0:10              0 (const uint)
51 0:13  Function Definition: type1::memFun(i1; ( temp int)
52 0:13    Function Parameters: 
53 0:13      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
54 0:13      'a' ( in int)
55 0:?     Sequence
56 0:14      Branch: Return with expression
57 0:14        Convert float to int ( temp int)
58 0:14          subtract ( temp float)
59 0:14            Convert int to float ( temp float)
60 0:14              add ( temp int)
61 0:14                i: direct index for structure ( temp int)
62 0:14                  '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
63 0:14                  Constant:
64 0:14                    1 (const uint)
65 0:14                'a' ( in int)
66 0:14            direct index ( temp float)
67 0:14              memVar: direct index for structure ( temp 4-component vector of float)
68 0:14                '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
69 0:14                Constant:
70 0:14                  0 (const uint)
71 0:14              Constant:
72 0:14                2 (const int)
73 0:19  Sequence
74 0:19    move second child to first child ( temp 2-component vector of float)
75 0:19      'j' ( global 2-component vector of float)
76 0:19      'i' ( global 2-component vector of float)
77 0:23  Function Definition: type2::memFun( ( temp 2-component vector of float)
78 0:23    Function Parameters: 
79 0:23      '@this' ( temp structure{})
80 0:?     Sequence
81 0:23      Branch: Return with expression
82 0:23        'i' ( global 2-component vector of float)
83 0:27  Function Definition: @main( ( temp 4-component vector of float)
84 0:27    Function Parameters: 
85 0:?     Sequence
86 0:29      Function Call: type1::setmem(vf4; ( temp void)
87 0:29        'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
88 0:?         Constant:
89 0:?           2.000000
90 0:?           2.000000
91 0:?           2.000000
92 0:?           2.000000
93 0:30      Function Call: type1::seti(i1; ( temp void)
94 0:30        'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
95 0:30        Constant:
96 0:30          17 (const int)
97 0:31      Sequence
98 0:31        move second child to first child ( temp 4-component vector of float)
99 0:31          'f4' ( temp 4-component vector of float)
100 0:?           Constant:
101 0:?             1.000000
102 0:?             1.000000
103 0:?             1.000000
104 0:?             1.000000
105 0:32      add second child into first child ( temp 4-component vector of float)
106 0:32        'f4' ( temp 4-component vector of float)
107 0:32        Function Call: type1::memFun(vf4; ( temp 4-component vector of float)
108 0:32          'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
109 0:?           Constant:
110 0:?             5.000000
111 0:?             5.000000
112 0:?             5.000000
113 0:?             5.000000
114 0:33      add second child into first child ( temp 4-component vector of float)
115 0:33        'f4' ( temp 4-component vector of float)
116 0:33        Convert int to float ( temp float)
117 0:33          Function Call: type1::memFun(i1; ( temp int)
118 0:33            'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
119 0:33            Constant:
120 0:33              7 (const int)
121 0:34      Branch: Return with expression
122 0:34        'f4' ( temp 4-component vector of float)
123 0:27  Function Definition: main( ( temp void)
124 0:27    Function Parameters: 
125 0:?     Sequence
126 0:27      move second child to first child ( temp 4-component vector of float)
127 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
128 0:27        Function Call: @main( ( temp 4-component vector of float)
129 0:?   Linker Objects
130 0:?     'i' ( global 2-component vector of float)
131 0:?     'j' ( global 2-component vector of float)
132 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
133
134
135 Linked fragment stage:
136
137
138 Shader version: 450
139 gl_FragCoord origin is upper left
140 0:? Sequence
141 0:1  Sequence
142 0:1    move second child to first child ( temp 2-component vector of float)
143 0:1      'i' ( global 2-component vector of float)
144 0:?       Constant:
145 0:?         1.000000
146 0:?         2.000000
147 0:5  Function Definition: type1::setmem(vf4; ( temp void)
148 0:5    Function Parameters: 
149 0:5      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
150 0:5      'm' ( in 4-component vector of float)
151 0:?     Sequence
152 0:5      move second child to first child ( temp 4-component vector of float)
153 0:5        memVar: direct index for structure ( temp 4-component vector of float)
154 0:5          '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
155 0:5          Constant:
156 0:5            0 (const uint)
157 0:5        'm' ( in 4-component vector of float)
158 0:6  Function Definition: type1::seti(i1; ( temp void)
159 0:6    Function Parameters: 
160 0:6      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
161 0:6      'si' ( in int)
162 0:?     Sequence
163 0:6      move second child to first child ( temp int)
164 0:6        i: direct index for structure ( temp int)
165 0:6          '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
166 0:6          Constant:
167 0:6            1 (const uint)
168 0:6        'si' ( in int)
169 0:9  Function Definition: type1::memFun(vf4; ( temp 4-component vector of float)
170 0:9    Function Parameters: 
171 0:9      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
172 0:9      'a' ( in 4-component vector of float)
173 0:?     Sequence
174 0:10      Branch: Return with expression
175 0:10        add ( temp 4-component vector of float)
176 0:10          vector-scale ( temp 4-component vector of float)
177 0:10            Convert int to float ( temp float)
178 0:10              i: direct index for structure ( temp int)
179 0:10                '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
180 0:10                Constant:
181 0:10                  1 (const uint)
182 0:10            'a' ( in 4-component vector of float)
183 0:10          memVar: direct index for structure ( temp 4-component vector of float)
184 0:10            '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
185 0:10            Constant:
186 0:10              0 (const uint)
187 0:13  Function Definition: type1::memFun(i1; ( temp int)
188 0:13    Function Parameters: 
189 0:13      '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
190 0:13      'a' ( in int)
191 0:?     Sequence
192 0:14      Branch: Return with expression
193 0:14        Convert float to int ( temp int)
194 0:14          subtract ( temp float)
195 0:14            Convert int to float ( temp float)
196 0:14              add ( temp int)
197 0:14                i: direct index for structure ( temp int)
198 0:14                  '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
199 0:14                  Constant:
200 0:14                    1 (const uint)
201 0:14                'a' ( in int)
202 0:14            direct index ( temp float)
203 0:14              memVar: direct index for structure ( temp 4-component vector of float)
204 0:14                '@this' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
205 0:14                Constant:
206 0:14                  0 (const uint)
207 0:14              Constant:
208 0:14                2 (const int)
209 0:19  Sequence
210 0:19    move second child to first child ( temp 2-component vector of float)
211 0:19      'j' ( global 2-component vector of float)
212 0:19      'i' ( global 2-component vector of float)
213 0:23  Function Definition: type2::memFun( ( temp 2-component vector of float)
214 0:23    Function Parameters: 
215 0:23      '@this' ( temp structure{})
216 0:?     Sequence
217 0:23      Branch: Return with expression
218 0:23        'i' ( global 2-component vector of float)
219 0:27  Function Definition: @main( ( temp 4-component vector of float)
220 0:27    Function Parameters: 
221 0:?     Sequence
222 0:29      Function Call: type1::setmem(vf4; ( temp void)
223 0:29        'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
224 0:?         Constant:
225 0:?           2.000000
226 0:?           2.000000
227 0:?           2.000000
228 0:?           2.000000
229 0:30      Function Call: type1::seti(i1; ( temp void)
230 0:30        'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
231 0:30        Constant:
232 0:30          17 (const int)
233 0:31      Sequence
234 0:31        move second child to first child ( temp 4-component vector of float)
235 0:31          'f4' ( temp 4-component vector of float)
236 0:?           Constant:
237 0:?             1.000000
238 0:?             1.000000
239 0:?             1.000000
240 0:?             1.000000
241 0:32      add second child into first child ( temp 4-component vector of float)
242 0:32        'f4' ( temp 4-component vector of float)
243 0:32        Function Call: type1::memFun(vf4; ( temp 4-component vector of float)
244 0:32          'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
245 0:?           Constant:
246 0:?             5.000000
247 0:?             5.000000
248 0:?             5.000000
249 0:?             5.000000
250 0:33      add second child into first child ( temp 4-component vector of float)
251 0:33        'f4' ( temp 4-component vector of float)
252 0:33        Convert int to float ( temp float)
253 0:33          Function Call: type1::memFun(i1; ( temp int)
254 0:33            'test' ( temp structure{ temp 4-component vector of float memVar,  temp int i})
255 0:33            Constant:
256 0:33              7 (const int)
257 0:34      Branch: Return with expression
258 0:34        'f4' ( temp 4-component vector of float)
259 0:27  Function Definition: main( ( temp void)
260 0:27    Function Parameters: 
261 0:?     Sequence
262 0:27      move second child to first child ( temp 4-component vector of float)
263 0:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
264 0:27        Function Call: @main( ( temp 4-component vector of float)
265 0:?   Linker Objects
266 0:?     'i' ( global 2-component vector of float)
267 0:?     'j' ( global 2-component vector of float)
268 0:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
269
270 // Module Version 10000
271 // Generated by (magic number): 80001
272 // Id's are bound by 111
273
274                               Capability Shader
275                1:             ExtInstImport  "GLSL.std.450"
276                               MemoryModel Logical GLSL450
277                               EntryPoint Fragment 4  "main" 109
278                               ExecutionMode 4 OriginUpperLeft
279                               Name 4  "main"
280                               Name 9  "type1"
281                               MemberName 9(type1) 0  "memVar"
282                               MemberName 9(type1) 1  "i"
283                               Name 15  "type1::setmem(vf4;"
284                               Name 13  "@this"
285                               Name 14  "m"
286                               Name 21  "type1::seti(i1;"
287                               Name 19  "@this"
288                               Name 20  "si"
289                               Name 26  "type1::memFun(vf4;"
290                               Name 24  "@this"
291                               Name 25  "a"
292                               Name 31  "type1::memFun(i1;"
293                               Name 29  "@this"
294                               Name 30  "a"
295                               Name 33  "type2"
296                               Name 38  "type2::memFun("
297                               Name 37  "@this"
298                               Name 41  "@main("
299                               Name 44  "i"
300                               Name 48  "j"
301                               Name 83  "test"
302                               Name 85  "param"
303                               Name 88  "param"
304                               Name 90  "f4"
305                               Name 94  "param"
306                               Name 99  "param"
307                               Name 109  "@entryPointOutput"
308                               Decorate 109(@entryPointOutput) Location 0
309                2:             TypeVoid
310                3:             TypeFunction 2
311                6:             TypeFloat 32
312                7:             TypeVector 6(float) 4
313                8:             TypeInt 32 1
314         9(type1):             TypeStruct 7(fvec4) 8(int)
315               10:             TypePointer Function 9(type1)
316               11:             TypePointer Function 7(fvec4)
317               12:             TypeFunction 2 10(ptr) 11(ptr)
318               17:             TypePointer Function 8(int)
319               18:             TypeFunction 2 10(ptr) 17(ptr)
320               23:             TypeFunction 7(fvec4) 10(ptr) 11(ptr)
321               28:             TypeFunction 8(int) 10(ptr) 17(ptr)
322        33(type2):             TypeStruct
323               34:             TypePointer Function 33(type2)
324               35:             TypeVector 6(float) 2
325               36:             TypeFunction 35(fvec2) 34(ptr)
326               40:             TypeFunction 7(fvec4)
327               43:             TypePointer Private 35(fvec2)
328            44(i):     43(ptr) Variable Private
329               45:    6(float) Constant 1065353216
330               46:    6(float) Constant 1073741824
331               47:   35(fvec2) ConstantComposite 45 46
332            48(j):     43(ptr) Variable Private
333               50:      8(int) Constant 0
334               53:      8(int) Constant 1
335               71:             TypeInt 32 0
336               72:     71(int) Constant 2
337               73:             TypePointer Function 6(float)
338               84:    7(fvec4) ConstantComposite 46 46 46 46
339               87:      8(int) Constant 17
340               91:    7(fvec4) ConstantComposite 45 45 45 45
341               92:    6(float) Constant 1084227584
342               93:    7(fvec4) ConstantComposite 92 92 92 92
343               98:      8(int) Constant 7
344              108:             TypePointer Output 7(fvec4)
345 109(@entryPointOutput):    108(ptr) Variable Output
346          4(main):           2 Function None 3
347                5:             Label
348                               Store 44(i) 47
349               49:   35(fvec2) Load 44(i)
350                               Store 48(j) 49
351              110:    7(fvec4) FunctionCall 41(@main()
352                               Store 109(@entryPointOutput) 110
353                               Return
354                               FunctionEnd
355 15(type1::setmem(vf4;):           2 Function None 12
356        13(@this):     10(ptr) FunctionParameter
357            14(m):     11(ptr) FunctionParameter
358               16:             Label
359               51:    7(fvec4) Load 14(m)
360               52:     11(ptr) AccessChain 13(@this) 50
361                               Store 52 51
362                               Return
363                               FunctionEnd
364 21(type1::seti(i1;):           2 Function None 18
365        19(@this):     10(ptr) FunctionParameter
366           20(si):     17(ptr) FunctionParameter
367               22:             Label
368               54:      8(int) Load 20(si)
369               55:     17(ptr) AccessChain 19(@this) 53
370                               Store 55 54
371                               Return
372                               FunctionEnd
373 26(type1::memFun(vf4;):    7(fvec4) Function None 23
374        24(@this):     10(ptr) FunctionParameter
375            25(a):     11(ptr) FunctionParameter
376               27:             Label
377               56:     17(ptr) AccessChain 24(@this) 53
378               57:      8(int) Load 56
379               58:    6(float) ConvertSToF 57
380               59:    7(fvec4) Load 25(a)
381               60:    7(fvec4) VectorTimesScalar 59 58
382               61:     11(ptr) AccessChain 24(@this) 50
383               62:    7(fvec4) Load 61
384               63:    7(fvec4) FAdd 60 62
385                               ReturnValue 63
386                               FunctionEnd
387 31(type1::memFun(i1;):      8(int) Function None 28
388        29(@this):     10(ptr) FunctionParameter
389            30(a):     17(ptr) FunctionParameter
390               32:             Label
391               66:     17(ptr) AccessChain 29(@this) 53
392               67:      8(int) Load 66
393               68:      8(int) Load 30(a)
394               69:      8(int) IAdd 67 68
395               70:    6(float) ConvertSToF 69
396               74:     73(ptr) AccessChain 29(@this) 50 72
397               75:    6(float) Load 74
398               76:    6(float) FSub 70 75
399               77:      8(int) ConvertFToS 76
400                               ReturnValue 77
401                               FunctionEnd
402 38(type2::memFun():   35(fvec2) Function None 36
403        37(@this):     34(ptr) FunctionParameter
404               39:             Label
405               80:   35(fvec2) Load 44(i)
406                               ReturnValue 80
407                               FunctionEnd
408       41(@main():    7(fvec4) Function None 40
409               42:             Label
410         83(test):     10(ptr) Variable Function
411        85(param):     11(ptr) Variable Function
412        88(param):     17(ptr) Variable Function
413           90(f4):     11(ptr) Variable Function
414        94(param):     11(ptr) Variable Function
415        99(param):     17(ptr) Variable Function
416                               Store 85(param) 84
417               86:           2 FunctionCall 15(type1::setmem(vf4;) 83(test) 85(param)
418                               Store 88(param) 87
419               89:           2 FunctionCall 21(type1::seti(i1;) 83(test) 88(param)
420                               Store 90(f4) 91
421                               Store 94(param) 93
422               95:    7(fvec4) FunctionCall 26(type1::memFun(vf4;) 83(test) 94(param)
423               96:    7(fvec4) Load 90(f4)
424               97:    7(fvec4) FAdd 96 95
425                               Store 90(f4) 97
426                               Store 99(param) 98
427              100:      8(int) FunctionCall 31(type1::memFun(i1;) 83(test) 99(param)
428              101:    6(float) ConvertSToF 100
429              102:    7(fvec4) Load 90(f4)
430              103:    7(fvec4) CompositeConstruct 101 101 101 101
431              104:    7(fvec4) FAdd 102 103
432                               Store 90(f4) 104
433              105:    7(fvec4) Load 90(f4)
434                               ReturnValue 105
435                               FunctionEnd