xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/baseResults/hlsl.structcopy.comp.out (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1hlsl.structcopy.comp
2Shader version: 500
3local_size = (128, 1, 1)
40:? Sequence
50:20  Function Definition: @main(u1; ( temp void)
60:20    Function Parameters:
70:20      'id' ( in uint)
80:?     Sequence
90:21      move second child to first child ( temp structure{ temp uint a,  temp uint b,  temp uint c})
100:21        direct index ( temp structure{ temp uint a,  temp uint b,  temp uint c})
110:21          's' ( shared 128-element array of structure{ temp uint a,  temp uint b,  temp uint c})
120:21          Constant:
130:21            0 (const int)
140:21        Constant:
150:21          1 (const uint)
160:21          2 (const uint)
170:21          3 (const uint)
180:22      Sequence
190:22        move second child to first child ( temp uint)
200:22          'count' ( temp uint)
210:22          count: direct index for structure ( temp uint)
220:22            direct index (layout( row_major std430) buffer structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
230:22              @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
240:22                'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data} @data})
250:22                Constant:
260:22                  0 (const uint)
270:22              Constant:
280:22                0 (const int)
290:22            Constant:
300:22              0 (const int)
310:23      Sequence
320:23        move second child to first child ( temp structure{ temp uint a,  temp uint b,  temp uint c})
330:23          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
340:23          Test condition and select ( temp structure{ temp uint a,  temp uint b,  temp uint c}): no shortcircuit
350:23            Condition
360:23            Compare Greater Than ( temp bool)
370:23              'id' ( in uint)
380:23              'count' ( temp uint)
390:23            true case
400:23            indirect index ( temp structure{ temp uint a,  temp uint b,  temp uint c})
410:23              's' ( shared 128-element array of structure{ temp uint a,  temp uint b,  temp uint c})
420:23              subtract ( temp uint)
430:23                'id' ( in uint)
440:23                'count' ( temp uint)
450:23            false case
460:23            indirect index ( temp structure{ temp uint a,  temp uint b,  temp uint c})
470:23              data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
480:23                direct index (layout( row_major std430) buffer structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
490:23                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
500:23                    'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data} @data})
510:23                    Constant:
520:23                      0 (const uint)
530:23                  Constant:
540:23                    0 (const int)
550:23                Constant:
560:23                  1 (const int)
570:23              'id' ( in uint)
580:25      AtomicAdd ( temp uint)
590:25        a: direct index for structure ( temp uint)
600:25          direct index (layout( row_major std430) buffer structure{ temp uint a,  temp uint b,  temp uint c})
610:25            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
620:25              'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
630:25              Constant:
640:25                0 (const uint)
650:25            Constant:
660:25              0 (const int)
670:25          Constant:
680:25            0 (const int)
690:25        a: direct index for structure ( temp uint)
700:25          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
710:25          Constant:
720:25            0 (const int)
730:26      AtomicAdd ( temp uint)
740:26        b: direct index for structure ( temp uint)
750:26          direct index (layout( row_major std430) buffer structure{ temp uint a,  temp uint b,  temp uint c})
760:26            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
770:26              'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
780:26              Constant:
790:26                0 (const uint)
800:26            Constant:
810:26              0 (const int)
820:26          Constant:
830:26            1 (const int)
840:26        b: direct index for structure ( temp uint)
850:26          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
860:26          Constant:
870:26            1 (const int)
880:27      AtomicAdd ( temp uint)
890:27        c: direct index for structure ( temp uint)
900:27          direct index (layout( row_major std430) buffer structure{ temp uint a,  temp uint b,  temp uint c})
910:27            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
920:27              'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
930:27              Constant:
940:27                0 (const uint)
950:27            Constant:
960:27              0 (const int)
970:27          Constant:
980:27            2 (const int)
990:27        c: direct index for structure ( temp uint)
1000:27          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1010:27          Constant:
1020:27            2 (const int)
1030:20  Function Definition: main( ( temp void)
1040:20    Function Parameters:
1050:?     Sequence
1060:20      move second child to first child ( temp uint)
1070:?         'id' ( temp uint)
1080:?         'id' ( in uint LocalInvocationIndex)
1090:20      Function Call: @main(u1; ( temp void)
1100:?         'id' ( temp uint)
1110:?   Linker Objects
1120:?     'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data} @data})
1130:?     'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
1140:?     's' ( shared 128-element array of structure{ temp uint a,  temp uint b,  temp uint c})
1150:?     'deflt' ( const structure{ temp uint a,  temp uint b,  temp uint c})
1160:?       1 (const uint)
1170:?       2 (const uint)
1180:?       3 (const uint)
1190:?     'id' ( in uint LocalInvocationIndex)
120
121
122Linked compute stage:
123
124
125Shader version: 500
126local_size = (128, 1, 1)
1270:? Sequence
1280:20  Function Definition: @main(u1; ( temp void)
1290:20    Function Parameters:
1300:20      'id' ( in uint)
1310:?     Sequence
1320:21      move second child to first child ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1330:21        direct index ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1340:21          's' ( shared 128-element array of structure{ temp uint a,  temp uint b,  temp uint c})
1350:21          Constant:
1360:21            0 (const int)
1370:21        Constant:
1380:21          1 (const uint)
1390:21          2 (const uint)
1400:21          3 (const uint)
1410:22      Sequence
1420:22        move second child to first child ( temp uint)
1430:22          'count' ( temp uint)
1440:22          count: direct index for structure ( temp uint)
1450:22            direct index (layout( row_major std430) buffer structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
1460:22              @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
1470:22                'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data} @data})
1480:22                Constant:
1490:22                  0 (const uint)
1500:22              Constant:
1510:22                0 (const int)
1520:22            Constant:
1530:22              0 (const int)
1540:23      Sequence
1550:23        move second child to first child ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1560:23          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1570:23          Test condition and select ( temp structure{ temp uint a,  temp uint b,  temp uint c}): no shortcircuit
1580:23            Condition
1590:23            Compare Greater Than ( temp bool)
1600:23              'id' ( in uint)
1610:23              'count' ( temp uint)
1620:23            true case
1630:23            indirect index ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1640:23              's' ( shared 128-element array of structure{ temp uint a,  temp uint b,  temp uint c})
1650:23              subtract ( temp uint)
1660:23                'id' ( in uint)
1670:23                'count' ( temp uint)
1680:23            false case
1690:23            indirect index ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1700:23              data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
1710:23                direct index (layout( row_major std430) buffer structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
1720:23                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data})
1730:23                    'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data} @data})
1740:23                    Constant:
1750:23                      0 (const uint)
1760:23                  Constant:
1770:23                    0 (const int)
1780:23                Constant:
1790:23                  1 (const int)
1800:23              'id' ( in uint)
1810:25      AtomicAdd ( temp uint)
1820:25        a: direct index for structure ( temp uint)
1830:25          direct index (layout( row_major std430) buffer structure{ temp uint a,  temp uint b,  temp uint c})
1840:25            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
1850:25              'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
1860:25              Constant:
1870:25                0 (const uint)
1880:25            Constant:
1890:25              0 (const int)
1900:25          Constant:
1910:25            0 (const int)
1920:25        a: direct index for structure ( temp uint)
1930:25          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
1940:25          Constant:
1950:25            0 (const int)
1960:26      AtomicAdd ( temp uint)
1970:26        b: direct index for structure ( temp uint)
1980:26          direct index (layout( row_major std430) buffer structure{ temp uint a,  temp uint b,  temp uint c})
1990:26            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
2000:26              'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
2010:26              Constant:
2020:26                0 (const uint)
2030:26            Constant:
2040:26              0 (const int)
2050:26          Constant:
2060:26            1 (const int)
2070:26        b: direct index for structure ( temp uint)
2080:26          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
2090:26          Constant:
2100:26            1 (const int)
2110:27      AtomicAdd ( temp uint)
2120:27        c: direct index for structure ( temp uint)
2130:27          direct index (layout( row_major std430) buffer structure{ temp uint a,  temp uint b,  temp uint c})
2140:27            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c})
2150:27              'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
2160:27              Constant:
2170:27                0 (const uint)
2180:27            Constant:
2190:27              0 (const int)
2200:27          Constant:
2210:27            2 (const int)
2220:27        c: direct index for structure ( temp uint)
2230:27          'ms' ( temp structure{ temp uint a,  temp uint b,  temp uint c})
2240:27          Constant:
2250:27            2 (const int)
2260:20  Function Definition: main( ( temp void)
2270:20    Function Parameters:
2280:?     Sequence
2290:20      move second child to first child ( temp uint)
2300:?         'id' ( temp uint)
2310:?         'id' ( in uint LocalInvocationIndex)
2320:20      Function Call: @main(u1; ( temp void)
2330:?         'id' ( temp uint)
2340:?   Linker Objects
2350:?     'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count,  temp unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} data} @data})
2360:?     'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a,  temp uint b,  temp uint c} @data})
2370:?     's' ( shared 128-element array of structure{ temp uint a,  temp uint b,  temp uint c})
2380:?     'deflt' ( const structure{ temp uint a,  temp uint b,  temp uint c})
2390:?       1 (const uint)
2400:?       2 (const uint)
2410:?       3 (const uint)
2420:?     'id' ( in uint LocalInvocationIndex)
243
244// Module Version 10000
245// Generated by (magic number): 8000b
246// Id's are bound by 88
247
248                              Capability Shader
249               1:             ExtInstImport  "GLSL.std.450"
250                              MemoryModel Logical GLSL450
251                              EntryPoint GLCompute 4  "main" 83
252                              ExecutionMode 4 LocalSize 128 1 1
253                              Source HLSL 500
254                              Name 4  "main"
255                              Name 10  "@main(u1;"
256                              Name 9  "id"
257                              Name 12  "MyStruct"
258                              MemberName 12(MyStruct) 0  "a"
259                              MemberName 12(MyStruct) 1  "b"
260                              MemberName 12(MyStruct) 2  "c"
261                              Name 16  "s"
262                              Name 25  "count"
263                              Name 26  "MyStruct"
264                              MemberName 26(MyStruct) 0  "a"
265                              MemberName 26(MyStruct) 1  "b"
266                              MemberName 26(MyStruct) 2  "c"
267                              Name 28  "MyStructs"
268                              MemberName 28(MyStructs) 0  "count"
269                              MemberName 28(MyStructs) 1  "data"
270                              Name 30  "sb"
271                              MemberName 30(sb) 0  "@data"
272                              Name 32  "sb"
273                              Name 37  "ms"
274                              Name 65  "o"
275                              MemberName 65(o) 0  "@data"
276                              Name 67  "o"
277                              Name 81  "id"
278                              Name 83  "id"
279                              Name 85  "param"
280                              MemberDecorate 26(MyStruct) 0 Offset 0
281                              MemberDecorate 26(MyStruct) 1 Offset 4
282                              MemberDecorate 26(MyStruct) 2 Offset 8
283                              Decorate 27 ArrayStride 12
284                              Decorate 28(MyStructs) BufferBlock
285                              MemberDecorate 28(MyStructs) 0 Offset 0
286                              MemberDecorate 28(MyStructs) 1 Offset 4
287                              Decorate 29 ArrayStride 16
288                              Decorate 30(sb) BufferBlock
289                              MemberDecorate 30(sb) 0 NonWritable
290                              MemberDecorate 30(sb) 0 Offset 0
291                              Decorate 32(sb) NonWritable
292                              Decorate 32(sb) Binding 0
293                              Decorate 32(sb) DescriptorSet 0
294                              Decorate 64 ArrayStride 12
295                              Decorate 65(o) BufferBlock
296                              MemberDecorate 65(o) 0 NonWritable
297                              MemberDecorate 65(o) 0 Offset 0
298                              Decorate 67(o) NonWritable
299                              Decorate 67(o) Binding 1
300                              Decorate 67(o) DescriptorSet 0
301                              Decorate 83(id) BuiltIn LocalInvocationIndex
302               2:             TypeVoid
303               3:             TypeFunction 2
304               6:             TypeInt 32 0
305               7:             TypePointer Function 6(int)
306               8:             TypeFunction 2 7(ptr)
307    12(MyStruct):             TypeStruct 6(int) 6(int) 6(int)
308              13:      6(int) Constant 128
309              14:             TypeArray 12(MyStruct) 13
310              15:             TypePointer Workgroup 14
311           16(s):     15(ptr) Variable Workgroup
312              17:             TypeInt 32 1
313              18:     17(int) Constant 0
314              19:      6(int) Constant 1
315              20:      6(int) Constant 2
316              21:      6(int) Constant 3
317              22:12(MyStruct) ConstantComposite 19 20 21
318              23:             TypePointer Workgroup 12(MyStruct)
319    26(MyStruct):             TypeStruct 6(int) 6(int) 6(int)
320              27:             TypeRuntimeArray 26(MyStruct)
321   28(MyStructs):             TypeStruct 6(int) 27
322              29:             TypeRuntimeArray 28(MyStructs)
323          30(sb):             TypeStruct 29
324              31:             TypePointer Uniform 30(sb)
325          32(sb):     31(ptr) Variable Uniform
326              33:             TypePointer Uniform 6(int)
327              36:             TypePointer Function 12(MyStruct)
328              40:             TypeBool
329              47:     17(int) Constant 1
330              49:             TypePointer Uniform 26(MyStruct)
331              61:     17(int) Constant 2
332              64:             TypeRuntimeArray 26(MyStruct)
333           65(o):             TypeStruct 64
334              66:             TypePointer Uniform 65(o)
335           67(o):     66(ptr) Variable Uniform
336              71:      6(int) Constant 0
337              82:             TypePointer Input 6(int)
338          83(id):     82(ptr) Variable Input
339         4(main):           2 Function None 3
340               5:             Label
341          81(id):      7(ptr) Variable Function
342       85(param):      7(ptr) Variable Function
343              84:      6(int) Load 83(id)
344                              Store 81(id) 84
345              86:      6(int) Load 81(id)
346                              Store 85(param) 86
347              87:           2 FunctionCall 10(@main(u1;) 85(param)
348                              Return
349                              FunctionEnd
350   10(@main(u1;):           2 Function None 8
351           9(id):      7(ptr) FunctionParameter
352              11:             Label
353       25(count):      7(ptr) Variable Function
354          37(ms):     36(ptr) Variable Function
355              52:     36(ptr) Variable Function
356              24:     23(ptr) AccessChain 16(s) 18
357                              Store 24 22
358              34:     33(ptr) AccessChain 32(sb) 18 18 18
359              35:      6(int) Load 34
360                              Store 25(count) 35
361              38:      6(int) Load 9(id)
362              39:      6(int) Load 25(count)
363              41:    40(bool) UGreaterThan 38 39
364              42:      6(int) Load 9(id)
365              43:      6(int) Load 25(count)
366              44:      6(int) ISub 42 43
367              45:     23(ptr) AccessChain 16(s) 44
368              46:12(MyStruct) Load 45
369              48:      6(int) Load 9(id)
370              50:     49(ptr) AccessChain 32(sb) 18 18 47 48
371              51:26(MyStruct) Load 50
372                              SelectionMerge 54 None
373                              BranchConditional 41 53 55
374              53:               Label
375                                Store 52 46
376                                Branch 54
377              55:               Label
378              56:      6(int)   CompositeExtract 51 0
379              57:      7(ptr)   AccessChain 52 18
380                                Store 57 56
381              58:      6(int)   CompositeExtract 51 1
382              59:      7(ptr)   AccessChain 52 47
383                                Store 59 58
384              60:      6(int)   CompositeExtract 51 2
385              62:      7(ptr)   AccessChain 52 61
386                                Store 62 60
387                                Branch 54
388              54:             Label
389              63:12(MyStruct) Load 52
390                              Store 37(ms) 63
391              68:     33(ptr) AccessChain 67(o) 18 18 18
392              69:      7(ptr) AccessChain 37(ms) 18
393              70:      6(int) Load 69
394              72:      6(int) AtomicIAdd 68 19 71 70
395              73:     33(ptr) AccessChain 67(o) 18 18 47
396              74:      7(ptr) AccessChain 37(ms) 47
397              75:      6(int) Load 74
398              76:      6(int) AtomicIAdd 73 19 71 75
399              77:     33(ptr) AccessChain 67(o) 18 18 61
400              78:      7(ptr) AccessChain 37(ms) 61
401              79:      6(int) Load 78
402              80:      6(int) AtomicIAdd 77 19 71 79
403                              Return
404                              FunctionEnd
405