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