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