yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

Jeff BolzAvoid reusing array types with stride when no stride is requested.d5eefa93

main
26.8 KiB468 linesraw
1hlsl.array.frag
2Shader version: 500
3gl_FragCoord origin is upper left
40:? Sequence
50:7  Sequence
60:7    move second child to first child ( temp 4-component vector of float)
70:7      'C' ( global 4-component vector of float)
80:7      Constant:
90:7        1.000000
100:7        2.000000
110:7        3.000000
120:7        4.000000
130:11  Sequence
140:11    move second child to first child ( temp 2-element array of 4-component vector of float)
150:11      'c2' ( global 2-element array of 4-component vector of float)
160:11      Construct vec4 ( temp 2-element array of 4-component vector of float)
170:11        'C' ( global 4-component vector of float)
180:11        Constant:
190:11          1.000000
200:11          2.000000
210:11          3.000000
220:11          4.000000
230:14  Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
240:14    Function Parameters: 
250:14      'i' ( in int)
260:14      'input' ( in 3-element array of 4-component vector of float)
270:?     Sequence
280:15      Sequence
290:15        move second child to first child ( temp 10-element array of 4-component vector of float)
300:15          'b' ( temp 10-element array of 4-component vector of float)
310:15          Construct vec4 ( temp 10-element array of 4-component vector of float)
320:15            'C' ( global 4-component vector of float)
330:15            'C' ( global 4-component vector of float)
340:15            'C' ( global 4-component vector of float)
350:15            'C' ( global 4-component vector of float)
360:15            'C' ( global 4-component vector of float)
370:15            'C' ( global 4-component vector of float)
380:15            'C' ( global 4-component vector of float)
390:15            'C' ( global 4-component vector of float)
400:15            'C' ( global 4-component vector of float)
410:15            'C' ( global 4-component vector of float)
420:16      Sequence
430:16        move second child to first child ( temp 4-component vector of float)
440:16          'tmp' ( temp 4-component vector of float)
450:16          add ( temp 4-component vector of float)
460:16            add ( temp 4-component vector of float)
470:16              add ( temp 4-component vector of float)
480:16                add ( temp 4-component vector of float)
490:16                  'C' ( global 4-component vector of float)
500:16                  direct index ( temp 4-component vector of float)
510:16                    a1: direct index for structure ( uniform 1-element array of 4-component vector of float)
520:16                      'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
530:16                      Constant:
540:16                        2 (const uint)
550:16                    Constant:
560:16                      0 (const int)
570:16                Constant:
580:16                  1.000000
590:16                  2.000000
600:16                  3.000000
610:16                  4.000000
620:16              indirect index ( temp 4-component vector of float)
630:16                a2: direct index for structure ( uniform 2-element array of 4-component vector of float)
640:16                  'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
650:16                  Constant:
660:16                    3 (const uint)
670:16                'i' ( in int)
680:16            indirect index ( temp 4-component vector of float)
690:16              'c2' ( global 2-element array of 4-component vector of float)
700:16              'i' ( in int)
710:17      Branch: Return with expression
720:17        add ( temp 4-component vector of float)
730:17          add ( temp 4-component vector of float)
740:17            add ( temp 4-component vector of float)
750:17              add ( temp 4-component vector of float)
760:17                add ( temp 4-component vector of float)
770:17                  add ( temp 4-component vector of float)
780:17                    add ( temp 4-component vector of float)
790:17                      direct index ( temp 4-component vector of float)
800:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
810:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
820:17                          Constant:
830:17                            0 (const uint)
840:17                        Constant:
850:17                          1 (const int)
860:17                      indirect index ( temp 4-component vector of float)
870:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
880:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
890:17                          Constant:
900:17                            0 (const uint)
910:17                        'i' ( in int)
920:17                    direct index ( temp 4-component vector of float)
930:17                      'input' ( in 3-element array of 4-component vector of float)
940:17                      Constant:
950:17                        2 (const int)
960:17                  indirect index ( temp 4-component vector of float)
970:17                    'input' ( in 3-element array of 4-component vector of float)
980:17                    'i' ( in int)
990:17                direct index ( temp 4-component vector of float)
1000:17                  'b' ( temp 10-element array of 4-component vector of float)
1010:17                  Constant:
1020:17                    5 (const int)
1030:17              indirect index ( temp 4-component vector of float)
1040:17                'b' ( temp 10-element array of 4-component vector of float)
1050:17                'i' ( in int)
1060:17            indirect index ( temp 4-component vector of float)
1070:17              m: direct index for structure ( temp 7-element array of 4-component vector of float)
1080:17                indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
1090:17                  s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
1100:17                    'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
1110:17                    Constant:
1120:17                      1 (const uint)
1130:17                  'i' ( in int)
1140:17                Constant:
1150:17                  0 (const int)
1160:17              'i' ( in int)
1170:17          'tmp' ( temp 4-component vector of float)
1180:14  Function Definition: PixelShaderFunction( ( temp void)
1190:14    Function Parameters: 
1200:?     Sequence
1210:14      move second child to first child ( temp int)
1220:?         'i' ( temp int)
1230:?         'i' (layout( location=0) flat in int)
1240:14      move second child to first child ( temp 3-element array of 4-component vector of float)
1250:?         'input' ( temp 3-element array of 4-component vector of float)
1260:?         'input' (layout( location=1) in 3-element array of 4-component vector of float)
1270:14      move second child to first child ( temp 4-component vector of float)
1280:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
1290:14        Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
1300:?           'i' ( temp int)
1310:?           'input' ( temp 3-element array of 4-component vector of float)
1320:?   Linker Objects
1330:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
1340:?     'C' ( global 4-component vector of float)
1350:?     'c1' ( const 1-element array of 4-component vector of float)
1360:?       1.000000
1370:?       2.000000
1380:?       3.000000
1390:?       4.000000
1400:?     'c2' ( global 2-element array of 4-component vector of float)
1410:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
1420:?     'i' (layout( location=0) flat in int)
1430:?     'input' (layout( location=1) in 3-element array of 4-component vector of float)
144
145
146Linked fragment stage:
147
148
149Shader version: 500
150gl_FragCoord origin is upper left
1510:? Sequence
1520:7  Sequence
1530:7    move second child to first child ( temp 4-component vector of float)
1540:7      'C' ( global 4-component vector of float)
1550:7      Constant:
1560:7        1.000000
1570:7        2.000000
1580:7        3.000000
1590:7        4.000000
1600:11  Sequence
1610:11    move second child to first child ( temp 2-element array of 4-component vector of float)
1620:11      'c2' ( global 2-element array of 4-component vector of float)
1630:11      Construct vec4 ( temp 2-element array of 4-component vector of float)
1640:11        'C' ( global 4-component vector of float)
1650:11        Constant:
1660:11          1.000000
1670:11          2.000000
1680:11          3.000000
1690:11          4.000000
1700:14  Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
1710:14    Function Parameters: 
1720:14      'i' ( in int)
1730:14      'input' ( in 3-element array of 4-component vector of float)
1740:?     Sequence
1750:15      Sequence
1760:15        move second child to first child ( temp 10-element array of 4-component vector of float)
1770:15          'b' ( temp 10-element array of 4-component vector of float)
1780:15          Construct vec4 ( temp 10-element array of 4-component vector of float)
1790:15            'C' ( global 4-component vector of float)
1800:15            'C' ( global 4-component vector of float)
1810:15            'C' ( global 4-component vector of float)
1820:15            'C' ( global 4-component vector of float)
1830:15            'C' ( global 4-component vector of float)
1840:15            'C' ( global 4-component vector of float)
1850:15            'C' ( global 4-component vector of float)
1860:15            'C' ( global 4-component vector of float)
1870:15            'C' ( global 4-component vector of float)
1880:15            'C' ( global 4-component vector of float)
1890:16      Sequence
1900:16        move second child to first child ( temp 4-component vector of float)
1910:16          'tmp' ( temp 4-component vector of float)
1920:16          add ( temp 4-component vector of float)
1930:16            add ( temp 4-component vector of float)
1940:16              add ( temp 4-component vector of float)
1950:16                add ( temp 4-component vector of float)
1960:16                  'C' ( global 4-component vector of float)
1970:16                  direct index ( temp 4-component vector of float)
1980:16                    a1: direct index for structure ( uniform 1-element array of 4-component vector of float)
1990:16                      'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
2000:16                      Constant:
2010:16                        2 (const uint)
2020:16                    Constant:
2030:16                      0 (const int)
2040:16                Constant:
2050:16                  1.000000
2060:16                  2.000000
2070:16                  3.000000
2080:16                  4.000000
2090:16              indirect index ( temp 4-component vector of float)
2100:16                a2: direct index for structure ( uniform 2-element array of 4-component vector of float)
2110:16                  'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
2120:16                  Constant:
2130:16                    3 (const uint)
2140:16                'i' ( in int)
2150:16            indirect index ( temp 4-component vector of float)
2160:16              'c2' ( global 2-element array of 4-component vector of float)
2170:16              'i' ( in int)
2180:17      Branch: Return with expression
2190:17        add ( temp 4-component vector of float)
2200:17          add ( temp 4-component vector of float)
2210:17            add ( temp 4-component vector of float)
2220:17              add ( temp 4-component vector of float)
2230:17                add ( temp 4-component vector of float)
2240:17                  add ( temp 4-component vector of float)
2250:17                    add ( temp 4-component vector of float)
2260:17                      direct index ( temp 4-component vector of float)
2270:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
2280:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
2290:17                          Constant:
2300:17                            0 (const uint)
2310:17                        Constant:
2320:17                          1 (const int)
2330:17                      indirect index ( temp 4-component vector of float)
2340:17                        a: direct index for structure ( uniform 4-element array of 4-component vector of float)
2350:17                          'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
2360:17                          Constant:
2370:17                            0 (const uint)
2380:17                        'i' ( in int)
2390:17                    direct index ( temp 4-component vector of float)
2400:17                      'input' ( in 3-element array of 4-component vector of float)
2410:17                      Constant:
2420:17                        2 (const int)
2430:17                  indirect index ( temp 4-component vector of float)
2440:17                    'input' ( in 3-element array of 4-component vector of float)
2450:17                    'i' ( in int)
2460:17                direct index ( temp 4-component vector of float)
2470:17                  'b' ( temp 10-element array of 4-component vector of float)
2480:17                  Constant:
2490:17                    5 (const int)
2500:17              indirect index ( temp 4-component vector of float)
2510:17                'b' ( temp 10-element array of 4-component vector of float)
2520:17                'i' ( in int)
2530:17            indirect index ( temp 4-component vector of float)
2540:17              m: direct index for structure ( temp 7-element array of 4-component vector of float)
2550:17                indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
2560:17                  s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
2570:17                    'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
2580:17                    Constant:
2590:17                      1 (const uint)
2600:17                  'i' ( in int)
2610:17                Constant:
2620:17                  0 (const int)
2630:17              'i' ( in int)
2640:17          'tmp' ( temp 4-component vector of float)
2650:14  Function Definition: PixelShaderFunction( ( temp void)
2660:14    Function Parameters: 
2670:?     Sequence
2680:14      move second child to first child ( temp int)
2690:?         'i' ( temp int)
2700:?         'i' (layout( location=0) flat in int)
2710:14      move second child to first child ( temp 3-element array of 4-component vector of float)
2720:?         'input' ( temp 3-element array of 4-component vector of float)
2730:?         'input' (layout( location=1) in 3-element array of 4-component vector of float)
2740:14      move second child to first child ( temp 4-component vector of float)
2750:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
2760:14        Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
2770:?           'i' ( temp int)
2780:?           'input' ( temp 3-element array of 4-component vector of float)
2790:?   Linker Objects
2800:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a,  uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s,  uniform 1-element array of 4-component vector of float a1,  uniform 2-element array of 4-component vector of float a2})
2810:?     'C' ( global 4-component vector of float)
2820:?     'c1' ( const 1-element array of 4-component vector of float)
2830:?       1.000000
2840:?       2.000000
2850:?       3.000000
2860:?       4.000000
2870:?     'c2' ( global 2-element array of 4-component vector of float)
2880:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
2890:?     'i' (layout( location=0) flat in int)
2900:?     'input' (layout( location=1) in 3-element array of 4-component vector of float)
291
292// Module Version 10000
293// Generated by (magic number): 8000b
294// Id's are bound by 118
295
296                              Capability Shader
297               1:             ExtInstImport  "GLSL.std.450"
298                              MemoryModel Logical GLSL450
299                              EntryPoint Fragment 4  "PixelShaderFunction" 103 107 110
300                              ExecutionMode 4 OriginUpperLeft
301                              Source HLSL 500
302                              Name 4  "PixelShaderFunction"
303                              Name 17  "@PixelShaderFunction(i1;vf4[3];"
304                              Name 15  "i"
305                              Name 16  "input"
306                              Name 20  "C"
307                              Name 29  "c2"
308                              Name 35  "b"
309                              Name 39  "tmp"
310                              Name 45  ""
311                              MemberName 45 0  "m"
312                              Name 51  "$Global"
313                              MemberName 51($Global) 0  "a"
314                              MemberName 51($Global) 1  "s"
315                              MemberName 51($Global) 2  "a1"
316                              MemberName 51($Global) 3  "a2"
317                              Name 53  ""
318                              Name 101  "i"
319                              Name 103  "i"
320                              Name 105  "input"
321                              Name 107  "input"
322                              Name 110  "@entryPointOutput"
323                              Name 111  "param"
324                              Name 113  "param"
325                              Decorate 42 ArrayStride 16
326                              Decorate 44 ArrayStride 16
327                              MemberDecorate 45 0 Offset 0
328                              Decorate 47 ArrayStride 112
329                              Decorate 49 ArrayStride 16
330                              Decorate 50 ArrayStride 16
331                              Decorate 51($Global) Block
332                              MemberDecorate 51($Global) 0 Offset 0
333                              MemberDecorate 51($Global) 1 Offset 64
334                              MemberDecorate 51($Global) 2 Offset 1296
335                              MemberDecorate 51($Global) 3 Offset 1312
336                              Decorate 53 Binding 0
337                              Decorate 53 DescriptorSet 0
338                              Decorate 103(i) Flat
339                              Decorate 103(i) Location 0
340                              Decorate 107(input) Location 1
341                              Decorate 110(@entryPointOutput) Location 0
342               2:             TypeVoid
343               3:             TypeFunction 2
344               6:             TypeInt 32 1
345               7:             TypePointer Function 6(int)
346               8:             TypeFloat 32
347               9:             TypeVector 8(float) 4
348              10:             TypeInt 32 0
349              11:     10(int) Constant 3
350              12:             TypeArray 9(fvec4) 11
351              13:             TypePointer Function 12
352              14:             TypeFunction 9(fvec4) 7(ptr) 13(ptr)
353              19:             TypePointer Private 9(fvec4)
354           20(C):     19(ptr) Variable Private
355              21:    8(float) Constant 1065353216
356              22:    8(float) Constant 1073741824
357              23:    8(float) Constant 1077936128
358              24:    8(float) Constant 1082130432
359              25:    9(fvec4) ConstantComposite 21 22 23 24
360              26:     10(int) Constant 2
361              27:             TypeArray 9(fvec4) 26
362              28:             TypePointer Private 27
363          29(c2):     28(ptr) Variable Private
364              32:     10(int) Constant 10
365              33:             TypeArray 9(fvec4) 32
366              34:             TypePointer Function 33
367              38:             TypePointer Function 9(fvec4)
368              41:     10(int) Constant 4
369              42:             TypeArray 9(fvec4) 41
370              43:     10(int) Constant 7
371              44:             TypeArray 9(fvec4) 43
372              45:             TypeStruct 44
373              46:     10(int) Constant 11
374              47:             TypeArray 45(struct) 46
375              48:     10(int) Constant 1
376              49:             TypeArray 9(fvec4) 48
377              50:             TypeArray 9(fvec4) 26
378     51($Global):             TypeStruct 42 47 49 50
379              52:             TypePointer Uniform 51($Global)
380              53:     52(ptr) Variable Uniform
381              54:      6(int) Constant 2
382              55:      6(int) Constant 0
383              56:             TypePointer Uniform 9(fvec4)
384              61:      6(int) Constant 3
385              70:      6(int) Constant 1
386              84:      6(int) Constant 5
387             102:             TypePointer Input 6(int)
388          103(i):    102(ptr) Variable Input
389             106:             TypePointer Input 12
390      107(input):    106(ptr) Variable Input
391             109:             TypePointer Output 9(fvec4)
392110(@entryPointOutput):    109(ptr) Variable Output
393             116:             TypeArray 9(fvec4) 48
394             117:         116 ConstantComposite 25
3954(PixelShaderFunction):           2 Function None 3
396               5:             Label
397          101(i):      7(ptr) Variable Function
398      105(input):     13(ptr) Variable Function
399      111(param):      7(ptr) Variable Function
400      113(param):     13(ptr) Variable Function
401                              Store 20(C) 25
402              30:    9(fvec4) Load 20(C)
403              31:          27 CompositeConstruct 30 25
404                              Store 29(c2) 31
405             104:      6(int) Load 103(i)
406                              Store 101(i) 104
407             108:          12 Load 107(input)
408                              Store 105(input) 108
409             112:      6(int) Load 101(i)
410                              Store 111(param) 112
411             114:          12 Load 105(input)
412                              Store 113(param) 114
413             115:    9(fvec4) FunctionCall 17(@PixelShaderFunction(i1;vf4[3];) 111(param) 113(param)
414                              Store 110(@entryPointOutput) 115
415                              Return
416                              FunctionEnd
41717(@PixelShaderFunction(i1;vf4[3];):    9(fvec4) Function None 14
418           15(i):      7(ptr) FunctionParameter
419       16(input):     13(ptr) FunctionParameter
420              18:             Label
421           35(b):     34(ptr) Variable Function
422         39(tmp):     38(ptr) Variable Function
423              36:    9(fvec4) Load 20(C)
424              37:          33 CompositeConstruct 36 36 36 36 36 36 36 36 36 36
425                              Store 35(b) 37
426              40:    9(fvec4) Load 20(C)
427              57:     56(ptr) AccessChain 53 54 55
428              58:    9(fvec4) Load 57
429              59:    9(fvec4) FAdd 40 58
430              60:    9(fvec4) FAdd 59 25
431              62:      6(int) Load 15(i)
432              63:     56(ptr) AccessChain 53 61 62
433              64:    9(fvec4) Load 63
434              65:    9(fvec4) FAdd 60 64
435              66:      6(int) Load 15(i)
436              67:     19(ptr) AccessChain 29(c2) 66
437              68:    9(fvec4) Load 67
438              69:    9(fvec4) FAdd 65 68
439                              Store 39(tmp) 69
440              71:     56(ptr) AccessChain 53 55 70
441              72:    9(fvec4) Load 71
442              73:      6(int) Load 15(i)
443              74:     56(ptr) AccessChain 53 55 73
444              75:    9(fvec4) Load 74
445              76:    9(fvec4) FAdd 72 75
446              77:     38(ptr) AccessChain 16(input) 54
447              78:    9(fvec4) Load 77
448              79:    9(fvec4) FAdd 76 78
449              80:      6(int) Load 15(i)
450              81:     38(ptr) AccessChain 16(input) 80
451              82:    9(fvec4) Load 81
452              83:    9(fvec4) FAdd 79 82
453              85:     38(ptr) AccessChain 35(b) 84
454              86:    9(fvec4) Load 85
455              87:    9(fvec4) FAdd 83 86
456              88:      6(int) Load 15(i)
457              89:     38(ptr) AccessChain 35(b) 88
458              90:    9(fvec4) Load 89
459              91:    9(fvec4) FAdd 87 90
460              92:      6(int) Load 15(i)
461              93:      6(int) Load 15(i)
462              94:     56(ptr) AccessChain 53 70 92 55 93
463              95:    9(fvec4) Load 94
464              96:    9(fvec4) FAdd 91 95
465              97:    9(fvec4) Load 39(tmp)
466              98:    9(fvec4) FAdd 96 97
467                              ReturnValue 98
468                              FunctionEnd