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