Don't remove SPIR-V blocks before codegen.
[platform/upstream/glslang.git] / Test / baseResults / spv.140.frag.out
1 spv.140.frag
2
3 Linked fragment stage:
4
5
6 // Module Version 10000
7 // Generated by (magic number): 80001
8 // Id's are bound by 101
9
10                               Capability Shader
11                1:             ExtInstImport  "GLSL.std.450"
12                               MemoryModel Logical GLSL450
13                               EntryPoint Fragment 4  "main" 16 28 33 43
14                               ExecutionMode 4 OriginLowerLeft
15                               Source GLSL 140
16                               Name 4  "main"
17                               Name 8  "foo("
18                               Name 11  "i1"
19                               Name 16  "gl_FrontFacing"
20                               Name 24  "i2"
21                               Name 28  "o"
22                               Name 33  "gl_ClipDistance"
23                               Name 43  "k"
24                               Name 55  "sampR"
25                               Name 63  "sampB"
26                               Name 87  "samp2Da"
27                               Name 92  "bn"
28                               MemberName 92(bn) 0  "matra"
29                               MemberName 92(bn) 1  "matca"
30                               MemberName 92(bn) 2  "matr"
31                               MemberName 92(bn) 3  "matc"
32                               MemberName 92(bn) 4  "matrdef"
33                               Name 94  ""
34                               Name 97  "bi"
35                               MemberName 97(bi) 0  "v"
36                               Name 100  "bname"
37                               Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
38                               Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
39                               Decorate 90 ArrayStride 64
40                               Decorate 91 ArrayStride 64
41                               MemberDecorate 92(bn) 0 RowMajor
42                               MemberDecorate 92(bn) 0 Offset 0
43                               MemberDecorate 92(bn) 0 MatrixStride 16
44                               MemberDecorate 92(bn) 1 ColMajor
45                               MemberDecorate 92(bn) 1 Offset 256
46                               MemberDecorate 92(bn) 1 MatrixStride 16
47                               MemberDecorate 92(bn) 2 RowMajor
48                               MemberDecorate 92(bn) 2 Offset 512
49                               MemberDecorate 92(bn) 2 MatrixStride 16
50                               MemberDecorate 92(bn) 3 ColMajor
51                               MemberDecorate 92(bn) 3 Offset 576
52                               MemberDecorate 92(bn) 3 MatrixStride 16
53                               MemberDecorate 92(bn) 4 RowMajor
54                               MemberDecorate 92(bn) 4 Offset 640
55                               MemberDecorate 92(bn) 4 MatrixStride 16
56                               Decorate 92(bn) Block
57                               Decorate 96 ArrayStride 16
58                               MemberDecorate 97(bi) 0 Offset 0
59                               Decorate 97(bi) Block
60                2:             TypeVoid
61                3:             TypeFunction 2
62                6:             TypeFloat 32
63                7:             TypeFunction 6(float)
64               10:             TypePointer Private 6(float)
65           11(i1):     10(ptr) Variable Private
66               12:             TypePointer Function 6(float)
67               14:             TypeBool
68               15:             TypePointer Input 14(bool)
69 16(gl_FrontFacing):     15(ptr) Variable Input
70               20:    6(float) Constant 3221225472
71               22:    6(float) Constant 1073741824
72           24(i2):     10(ptr) Variable Private
73               25:    6(float) Constant 1120665600
74               26:             TypeVector 6(float) 4
75               27:             TypePointer Output 26(fvec4)
76            28(o):     27(ptr) Variable Output
77               29:             TypeInt 32 0
78               30:     29(int) Constant 5
79               31:             TypeArray 6(float) 30
80               32:             TypePointer Input 31
81 33(gl_ClipDistance):     32(ptr) Variable Input
82               34:             TypeInt 32 1
83               35:     34(int) Constant 2
84               36:             TypePointer Input 6(float)
85               39:     29(int) Constant 1
86               40:             TypePointer Output 6(float)
87               42:             TypePointer Input 26(fvec4)
88            43(k):     42(ptr) Variable Input
89               45:             TypeVector 34(int) 4
90               50:     29(int) Constant 2
91               52:             TypeImage 6(float) Rect sampled format:Unknown
92               53:             TypeSampledImage 52
93               54:             TypePointer UniformConstant 53
94        55(sampR):     54(ptr) Variable UniformConstant
95               58:             TypeVector 34(int) 2
96               60:             TypeImage 34(int) Buffer sampled format:Unknown
97               61:             TypeSampledImage 60
98               62:             TypePointer UniformConstant 61
99        63(sampB):     62(ptr) Variable UniformConstant
100               69:             TypeVector 6(float) 2
101               72:    6(float) Constant 1120403456
102               74:     29(int) Constant 3
103               83:             TypeImage 6(float) 2D sampled format:Unknown
104               84:             TypeSampledImage 83
105               85:             TypeArray 84 74
106               86:             TypePointer UniformConstant 85
107      87(samp2Da):     86(ptr) Variable UniformConstant
108               88:             TypeMatrix 26(fvec4) 4
109               89:     29(int) Constant 4
110               90:             TypeArray 88 89
111               91:             TypeArray 88 89
112           92(bn):             TypeStruct 90 91 88 88 88
113               93:             TypePointer Uniform 92(bn)
114               94:     93(ptr) Variable Uniform
115               95:             TypeVector 6(float) 3
116               96:             TypeArray 95(fvec3) 50
117           97(bi):             TypeStruct 96
118               98:             TypeArray 97(bi) 89
119               99:             TypePointer Uniform 98
120       100(bname):     99(ptr) Variable Uniform
121          4(main):           2 Function None 3
122                5:             Label
123               13:     12(ptr) Variable Function
124               17:    14(bool) Load 16(gl_FrontFacing)
125                               SelectionMerge 19 None
126                               BranchConditional 17 18 21
127               18:               Label
128                                 Store 13 20
129                                 Branch 19
130               21:               Label
131                                 Store 13 22
132                                 Branch 19
133               19:             Label
134               23:    6(float) Load 13
135                               Store 11(i1) 23
136                               Store 24(i2) 25
137               37:     36(ptr) AccessChain 33(gl_ClipDistance) 35
138               38:    6(float) Load 37
139               41:     40(ptr) AccessChain 28(o) 39
140                               Store 41 38
141               44:   26(fvec4) Load 43(k)
142               46:   45(ivec4) ConvertFToS 44
143               47:     34(int) CompositeExtract 46 0
144               48:     36(ptr) AccessChain 33(gl_ClipDistance) 47
145               49:    6(float) Load 48
146               51:     40(ptr) AccessChain 28(o) 50
147                               Store 51 49
148               56:          53 Load 55(sampR)
149               57:          52 Image 56
150               59:   58(ivec2) ImageQuerySize 57
151               64:          61 Load 63(sampB)
152               65:          60 Image 64
153               66:     34(int) ImageQuerySize 65
154               67:   58(ivec2) CompositeConstruct 66 66
155               68:   58(ivec2) IAdd 59 67
156               70:   69(fvec2) ConvertSToF 68
157               71:    6(float) CompositeExtract 70 0
158               73:    6(float) FDiv 71 72
159               75:     40(ptr) AccessChain 28(o) 74
160                               Store 75 73
161               76:    6(float) FunctionCall 8(foo()
162               77:     40(ptr) AccessChain 28(o) 50
163                               Store 77 76
164                               Return
165                               FunctionEnd
166          8(foo():    6(float) Function None 7
167                9:             Label
168               78:    6(float) Load 11(i1)
169               79:    6(float) Load 24(i2)
170               80:    6(float) FAdd 78 79
171                               ReturnValue 80
172                               FunctionEnd