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