xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/baseResults/hlsl.structbuffer.byte.frag.out (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1hlsl.structbuffer.byte.frag
2Shader version: 500
3gl_FragCoord origin is upper left
40:? Sequence
50:5  Function Definition: @main(u1; ( temp 4-component vector of float)
60:5    Function Parameters:
70:5      'pos' ( in uint)
80:?     Sequence
90:7      Sequence
100:7        move second child to first child ( temp uint)
110:7          'size' ( temp uint)
120:7          array length ( temp uint)
130:7            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
140:7              'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
150:7              Constant:
160:7                0 (const uint)
170:12      Branch: Return with expression
180:11        add ( temp 4-component vector of float)
190:10          add ( temp 4-component vector of float)
200:9            add ( temp 4-component vector of float)
210:9              Convert uint to float ( temp float)
220:9                indirect index (layout( row_major std430) buffer uint)
230:9                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
240:9                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
250:9                    Constant:
260:9                      0 (const uint)
270:9                  right-shift ( temp int)
280:9                    'pos' ( in uint)
290:9                    Constant:
300:9                      2 (const int)
310:10              Construct vec4 ( temp 4-component vector of float)
320:?                 Convert uint to float ( temp 2-component vector of float)
330:?                   Sequence
340:10                    move second child to first child ( temp int)
350:10                      'byteAddrTemp' ( temp int)
360:10                      right-shift ( temp int)
370:10                        add ( temp uint)
380:10                          'pos' ( in uint)
390:10                          Constant:
400:10                            4 (const uint)
410:10                        Constant:
420:10                          2 (const int)
430:?                     Construct vec2 ( temp 2-component vector of uint)
440:10                      indirect index ( temp uint)
450:10                        @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
460:10                          'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
470:10                          Constant:
480:10                            0 (const uint)
490:10                        'byteAddrTemp' ( temp int)
500:10                      indirect index ( temp uint)
510:10                        @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
520:10                          'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
530:10                          Constant:
540:10                            0 (const uint)
550:10                        add ( temp int)
560:10                          'byteAddrTemp' ( temp int)
570:10                          Constant:
580:10                            1 (const int)
590:10                Constant:
600:10                  0.000000
610:10                Constant:
620:10                  0.000000
630:11            Construct vec4 ( temp 4-component vector of float)
640:?               Convert uint to float ( temp 3-component vector of float)
650:?                 Sequence
660:11                  move second child to first child ( temp int)
670:11                    'byteAddrTemp' ( temp int)
680:11                    right-shift ( temp int)
690:11                      add ( temp uint)
700:11                        'pos' ( in uint)
710:11                        Constant:
720:11                          8 (const uint)
730:11                      Constant:
740:11                        2 (const int)
750:?                   Construct vec3 ( temp 3-component vector of uint)
760:11                    indirect index ( temp uint)
770:11                      @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
780:11                        'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
790:11                        Constant:
800:11                          0 (const uint)
810:11                      'byteAddrTemp' ( temp int)
820:11                    indirect index ( temp uint)
830:11                      @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
840:11                        'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
850:11                        Constant:
860:11                          0 (const uint)
870:11                      add ( temp int)
880:11                        'byteAddrTemp' ( temp int)
890:11                        Constant:
900:11                          1 (const int)
910:11                    indirect index ( temp uint)
920:11                      @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
930:11                        'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
940:11                        Constant:
950:11                          0 (const uint)
960:11                      add ( temp int)
970:11                        'byteAddrTemp' ( temp int)
980:11                        Constant:
990:11                          2 (const int)
1000:11              Constant:
1010:11                0.000000
1020:?           Convert uint to float ( temp 4-component vector of float)
1030:?             Sequence
1040:12              move second child to first child ( temp int)
1050:12                'byteAddrTemp' ( temp int)
1060:12                right-shift ( temp int)
1070:12                  add ( temp uint)
1080:12                    'pos' ( in uint)
1090:12                    Constant:
1100:12                      12 (const uint)
1110:12                  Constant:
1120:12                    2 (const int)
1130:?               Construct vec4 ( temp 4-component vector of uint)
1140:12                indirect index ( temp uint)
1150:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
1160:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1170:12                    Constant:
1180:12                      0 (const uint)
1190:12                  'byteAddrTemp' ( temp int)
1200:12                indirect index ( temp uint)
1210:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
1220:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1230:12                    Constant:
1240:12                      0 (const uint)
1250:12                  add ( temp int)
1260:12                    'byteAddrTemp' ( temp int)
1270:12                    Constant:
1280:12                      1 (const int)
1290:12                indirect index ( temp uint)
1300:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
1310:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1320:12                    Constant:
1330:12                      0 (const uint)
1340:12                  add ( temp int)
1350:12                    'byteAddrTemp' ( temp int)
1360:12                    Constant:
1370:12                      2 (const int)
1380:12                indirect index ( temp uint)
1390:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
1400:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1410:12                    Constant:
1420:12                      0 (const uint)
1430:12                  add ( temp int)
1440:12                    'byteAddrTemp' ( temp int)
1450:12                    Constant:
1460:12                      3 (const int)
1470:5  Function Definition: main( ( temp void)
1480:5    Function Parameters:
1490:?     Sequence
1500:5      move second child to first child ( temp uint)
1510:?         'pos' ( temp uint)
1520:?         'pos' (layout( location=0) flat in uint)
1530:5      move second child to first child ( temp 4-component vector of float)
1540:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
1550:5        Function Call: @main(u1; ( temp 4-component vector of float)
1560:?           'pos' ( temp uint)
1570:?   Linker Objects
1580:?     'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1590:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
1600:?     'pos' (layout( location=0) flat in uint)
161
162
163Linked fragment stage:
164
165
166Shader version: 500
167gl_FragCoord origin is upper left
1680:? Sequence
1690:5  Function Definition: @main(u1; ( temp 4-component vector of float)
1700:5    Function Parameters:
1710:5      'pos' ( in uint)
1720:?     Sequence
1730:7      Sequence
1740:7        move second child to first child ( temp uint)
1750:7          'size' ( temp uint)
1760:7          array length ( temp uint)
1770:7            @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
1780:7              'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1790:7              Constant:
1800:7                0 (const uint)
1810:12      Branch: Return with expression
1820:11        add ( temp 4-component vector of float)
1830:10          add ( temp 4-component vector of float)
1840:9            add ( temp 4-component vector of float)
1850:9              Convert uint to float ( temp float)
1860:9                indirect index (layout( row_major std430) buffer uint)
1870:9                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
1880:9                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
1890:9                    Constant:
1900:9                      0 (const uint)
1910:9                  right-shift ( temp int)
1920:9                    'pos' ( in uint)
1930:9                    Constant:
1940:9                      2 (const int)
1950:10              Construct vec4 ( temp 4-component vector of float)
1960:?                 Convert uint to float ( temp 2-component vector of float)
1970:?                   Sequence
1980:10                    move second child to first child ( temp int)
1990:10                      'byteAddrTemp' ( temp int)
2000:10                      right-shift ( temp int)
2010:10                        add ( temp uint)
2020:10                          'pos' ( in uint)
2030:10                          Constant:
2040:10                            4 (const uint)
2050:10                        Constant:
2060:10                          2 (const int)
2070:?                     Construct vec2 ( temp 2-component vector of uint)
2080:10                      indirect index ( temp uint)
2090:10                        @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2100:10                          'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2110:10                          Constant:
2120:10                            0 (const uint)
2130:10                        'byteAddrTemp' ( temp int)
2140:10                      indirect index ( temp uint)
2150:10                        @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2160:10                          'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2170:10                          Constant:
2180:10                            0 (const uint)
2190:10                        add ( temp int)
2200:10                          'byteAddrTemp' ( temp int)
2210:10                          Constant:
2220:10                            1 (const int)
2230:10                Constant:
2240:10                  0.000000
2250:10                Constant:
2260:10                  0.000000
2270:11            Construct vec4 ( temp 4-component vector of float)
2280:?               Convert uint to float ( temp 3-component vector of float)
2290:?                 Sequence
2300:11                  move second child to first child ( temp int)
2310:11                    'byteAddrTemp' ( temp int)
2320:11                    right-shift ( temp int)
2330:11                      add ( temp uint)
2340:11                        'pos' ( in uint)
2350:11                        Constant:
2360:11                          8 (const uint)
2370:11                      Constant:
2380:11                        2 (const int)
2390:?                   Construct vec3 ( temp 3-component vector of uint)
2400:11                    indirect index ( temp uint)
2410:11                      @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2420:11                        'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2430:11                        Constant:
2440:11                          0 (const uint)
2450:11                      'byteAddrTemp' ( temp int)
2460:11                    indirect index ( temp uint)
2470:11                      @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2480:11                        'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2490:11                        Constant:
2500:11                          0 (const uint)
2510:11                      add ( temp int)
2520:11                        'byteAddrTemp' ( temp int)
2530:11                        Constant:
2540:11                          1 (const int)
2550:11                    indirect index ( temp uint)
2560:11                      @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2570:11                        'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2580:11                        Constant:
2590:11                          0 (const uint)
2600:11                      add ( temp int)
2610:11                        'byteAddrTemp' ( temp int)
2620:11                        Constant:
2630:11                          2 (const int)
2640:11              Constant:
2650:11                0.000000
2660:?           Convert uint to float ( temp 4-component vector of float)
2670:?             Sequence
2680:12              move second child to first child ( temp int)
2690:12                'byteAddrTemp' ( temp int)
2700:12                right-shift ( temp int)
2710:12                  add ( temp uint)
2720:12                    'pos' ( in uint)
2730:12                    Constant:
2740:12                      12 (const uint)
2750:12                  Constant:
2760:12                    2 (const int)
2770:?               Construct vec4 ( temp 4-component vector of uint)
2780:12                indirect index ( temp uint)
2790:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2800:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2810:12                    Constant:
2820:12                      0 (const uint)
2830:12                  'byteAddrTemp' ( temp int)
2840:12                indirect index ( temp uint)
2850:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2860:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2870:12                    Constant:
2880:12                      0 (const uint)
2890:12                  add ( temp int)
2900:12                    'byteAddrTemp' ( temp int)
2910:12                    Constant:
2920:12                      1 (const int)
2930:12                indirect index ( temp uint)
2940:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
2950:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
2960:12                    Constant:
2970:12                      0 (const uint)
2980:12                  add ( temp int)
2990:12                    'byteAddrTemp' ( temp int)
3000:12                    Constant:
3010:12                      2 (const int)
3020:12                indirect index ( temp uint)
3030:12                  @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint)
3040:12                    'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
3050:12                    Constant:
3060:12                      0 (const uint)
3070:12                  add ( temp int)
3080:12                    'byteAddrTemp' ( temp int)
3090:12                    Constant:
3100:12                      3 (const int)
3110:5  Function Definition: main( ( temp void)
3120:5    Function Parameters:
3130:?     Sequence
3140:5      move second child to first child ( temp uint)
3150:?         'pos' ( temp uint)
3160:?         'pos' (layout( location=0) flat in uint)
3170:5      move second child to first child ( temp 4-component vector of float)
3180:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
3190:5        Function Call: @main(u1; ( temp 4-component vector of float)
3200:?           'pos' ( temp uint)
3210:?   Linker Objects
3220:?     'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data})
3230:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
3240:?     'pos' (layout( location=0) flat in uint)
325
326// Module Version 10000
327// Generated by (magic number): 8000b
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                              Source HLSL 500
336                              Name 4  "main"
337                              Name 12  "@main(u1;"
338                              Name 11  "pos"
339                              Name 14  "size"
340                              Name 16  "sbuf"
341                              MemberName 16(sbuf) 0  "@data"
342                              Name 18  "sbuf"
343                              Name 30  "byteAddrTemp"
344                              Name 53  "byteAddrTemp"
345                              Name 78  "byteAddrTemp"
346                              Name 105  "pos"
347                              Name 107  "pos"
348                              Name 110  "@entryPointOutput"
349                              Name 111  "param"
350                              Decorate 15 ArrayStride 4
351                              Decorate 16(sbuf) BufferBlock
352                              MemberDecorate 16(sbuf) 0 NonWritable
353                              MemberDecorate 16(sbuf) 0 Offset 0
354                              Decorate 18(sbuf) NonWritable
355                              Decorate 18(sbuf) Binding 0
356                              Decorate 18(sbuf) DescriptorSet 0
357                              Decorate 107(pos) Flat
358                              Decorate 107(pos) Location 0
359                              Decorate 110(@entryPointOutput) Location 0
360               2:             TypeVoid
361               3:             TypeFunction 2
362               6:             TypeInt 32 0
363               7:             TypePointer Function 6(int)
364               8:             TypeFloat 32
365               9:             TypeVector 8(float) 4
366              10:             TypeFunction 9(fvec4) 7(ptr)
367              15:             TypeRuntimeArray 6(int)
368        16(sbuf):             TypeStruct 15
369              17:             TypePointer Uniform 16(sbuf)
370        18(sbuf):     17(ptr) Variable Uniform
371              20:             TypeInt 32 1
372              21:     20(int) Constant 0
373              23:     20(int) Constant 2
374              25:             TypePointer Uniform 6(int)
375              29:             TypePointer Function 20(int)
376              32:      6(int) Constant 4
377              39:     20(int) Constant 1
378              43:             TypeVector 6(int) 2
379              45:             TypeVector 8(float) 2
380              47:    8(float) Constant 0
381              55:      6(int) Constant 8
382              69:             TypeVector 6(int) 3
383              71:             TypeVector 8(float) 3
384              80:      6(int) Constant 12
385              95:     20(int) Constant 3
386              99:             TypeVector 6(int) 4
387             106:             TypePointer Input 6(int)
388        107(pos):    106(ptr) Variable Input
389             109:             TypePointer Output 9(fvec4)
390110(@entryPointOutput):    109(ptr) Variable Output
391         4(main):           2 Function None 3
392               5:             Label
393        105(pos):      7(ptr) Variable Function
394      111(param):      7(ptr) Variable Function
395             108:      6(int) Load 107(pos)
396                              Store 105(pos) 108
397             112:      6(int) Load 105(pos)
398                              Store 111(param) 112
399             113:    9(fvec4) FunctionCall 12(@main(u1;) 111(param)
400                              Store 110(@entryPointOutput) 113
401                              Return
402                              FunctionEnd
403   12(@main(u1;):    9(fvec4) Function None 10
404         11(pos):      7(ptr) FunctionParameter
405              13:             Label
406        14(size):      7(ptr) Variable Function
40730(byteAddrTemp):     29(ptr) Variable Function
40853(byteAddrTemp):     29(ptr) Variable Function
40978(byteAddrTemp):     29(ptr) Variable Function
410              19:      6(int) ArrayLength 18(sbuf) 0
411                              Store 14(size) 19
412              22:      6(int) Load 11(pos)
413              24:     20(int) ShiftRightLogical 22 23
414              26:     25(ptr) AccessChain 18(sbuf) 21 24
415              27:      6(int) Load 26
416              28:    8(float) ConvertUToF 27
417              31:      6(int) Load 11(pos)
418              33:      6(int) IAdd 31 32
419              34:     20(int) ShiftRightLogical 33 23
420                              Store 30(byteAddrTemp) 34
421              35:     20(int) Load 30(byteAddrTemp)
422              36:     25(ptr) AccessChain 18(sbuf) 21 35
423              37:      6(int) Load 36
424              38:     20(int) Load 30(byteAddrTemp)
425              40:     20(int) IAdd 38 39
426              41:     25(ptr) AccessChain 18(sbuf) 21 40
427              42:      6(int) Load 41
428              44:   43(ivec2) CompositeConstruct 37 42
429              46:   45(fvec2) ConvertUToF 44
430              48:    8(float) CompositeExtract 46 0
431              49:    8(float) CompositeExtract 46 1
432              50:    9(fvec4) CompositeConstruct 48 49 47 47
433              51:    9(fvec4) CompositeConstruct 28 28 28 28
434              52:    9(fvec4) FAdd 51 50
435              54:      6(int) Load 11(pos)
436              56:      6(int) IAdd 54 55
437              57:     20(int) ShiftRightLogical 56 23
438                              Store 53(byteAddrTemp) 57
439              58:     20(int) Load 53(byteAddrTemp)
440              59:     25(ptr) AccessChain 18(sbuf) 21 58
441              60:      6(int) Load 59
442              61:     20(int) Load 53(byteAddrTemp)
443              62:     20(int) IAdd 61 39
444              63:     25(ptr) AccessChain 18(sbuf) 21 62
445              64:      6(int) Load 63
446              65:     20(int) Load 53(byteAddrTemp)
447              66:     20(int) IAdd 65 23
448              67:     25(ptr) AccessChain 18(sbuf) 21 66
449              68:      6(int) Load 67
450              70:   69(ivec3) CompositeConstruct 60 64 68
451              72:   71(fvec3) ConvertUToF 70
452              73:    8(float) CompositeExtract 72 0
453              74:    8(float) CompositeExtract 72 1
454              75:    8(float) CompositeExtract 72 2
455              76:    9(fvec4) CompositeConstruct 73 74 75 47
456              77:    9(fvec4) FAdd 52 76
457              79:      6(int) Load 11(pos)
458              81:      6(int) IAdd 79 80
459              82:     20(int) ShiftRightLogical 81 23
460                              Store 78(byteAddrTemp) 82
461              83:     20(int) Load 78(byteAddrTemp)
462              84:     25(ptr) AccessChain 18(sbuf) 21 83
463              85:      6(int) Load 84
464              86:     20(int) Load 78(byteAddrTemp)
465              87:     20(int) IAdd 86 39
466              88:     25(ptr) AccessChain 18(sbuf) 21 87
467              89:      6(int) Load 88
468              90:     20(int) Load 78(byteAddrTemp)
469              91:     20(int) IAdd 90 23
470              92:     25(ptr) AccessChain 18(sbuf) 21 91
471              93:      6(int) Load 92
472              94:     20(int) Load 78(byteAddrTemp)
473              96:     20(int) IAdd 94 95
474              97:     25(ptr) AccessChain 18(sbuf) 21 96
475              98:      6(int) Load 97
476             100:   99(ivec4) CompositeConstruct 85 89 93 98
477             101:    9(fvec4) ConvertUToF 100
478             102:    9(fvec4) FAdd 77 101
479                              ReturnValue 102
480                              FunctionEnd
481