1spv.debugInfo.frag
2// Module Version 10000
3// Generated by (magic number): 80007
4// Id's are bound by 124
5
6                              Capability Shader
7               2:             ExtInstImport  "GLSL.std.450"
8                              MemoryModel Logical GLSL450
9                              EntryPoint Fragment 5  "main" 24 52
10                              ExecutionMode 5 OriginLowerLeft
11               1:             String  "spv.debugInfo.frag"
12                              Source GLSL 450 1  "// OpModuleProcessed no-storage-format
13// OpModuleProcessed resource-set-binding 3
14// OpModuleProcessed auto-map-bindings
15// OpModuleProcessed auto-map-locations
16// OpModuleProcessed client opengl100
17// OpModuleProcessed target-env opengl
18// OpModuleProcessed relaxed-errors
19// OpModuleProcessed suppress-warnings
20// OpModuleProcessed hlsl-offsets
21// OpModuleProcessed entry-point main
22#line 1
23#version 450
24
25struct S {
26    int a;
27};
28
29uniform ubuf {
30    S s;
31};
32
33uniform sampler2D s2d;
34
35layout(location = 0) in vec4 inv;
36layout(location = 0) out vec4 outv;
37
38vec4 foo(S s)
39{
40    vec4 r = s.a * inv;
41    ++r;
42    if (r.x > 3.0)
43        --r;
44    else
45        r *= 2;
46
47    return r;
48}
49
50void main()
51{
52    outv = foo(s);
53    outv += texture(s2d, vec2(0.5));
54
55    switch (s.a) {
56    case 10:
57        ++outv;
58        break;
59    case 20:
60        outv = 2 * outv;
61        ++outv;
62        break;
63    default:
64        --outv;
65        break;
66    }
67
68    for (int i = 0; i < 10; ++i)
69        outv *= 3.0;
70
71    outv.x < 10.0 ?
72        outv = sin(outv) :
73        outv = cos(outv);
74}"
75                              Name 5  "main"
76                              Name 8  "S"
77                              MemberName 8(S) 0  "a"
78                              Name 14  "foo(struct-S-i11;"
79                              Name 13  "s"
80                              Name 17  "r"
81                              Name 24  "inv"
82                              Name 52  "outv"
83                              Name 53  "S"
84                              MemberName 53(S) 0  "a"
85                              Name 54  "ubuf"
86                              MemberName 54(ubuf) 0  "s"
87                              Name 56  ""
88                              Name 57  "param"
89                              Name 67  "s2d"
90                              Name 97  "i"
91                              Decorate 24(inv) Location 0
92                              Decorate 52(outv) Location 0
93                              MemberDecorate 53(S) 0 Offset 0
94                              MemberDecorate 54(ubuf) 0 Offset 0
95                              Decorate 54(ubuf) Block
96                              Decorate 56 DescriptorSet 3
97                              Decorate 56 Binding 0
98                              Decorate 67(s2d) Location 0
99                              Decorate 67(s2d) DescriptorSet 3
100                              Decorate 67(s2d) Binding 1
101               3:             TypeVoid
102               4:             TypeFunction 3
103               7:             TypeInt 32 1
104            8(S):             TypeStruct 7(int)
105               9:             TypePointer Function 8(S)
106              10:             TypeFloat 32
107              11:             TypeVector 10(float) 4
108              12:             TypeFunction 11(fvec4) 9(ptr)
109              16:             TypePointer Function 11(fvec4)
110              18:      7(int) Constant 0
111              19:             TypePointer Function 7(int)
112              23:             TypePointer Input 11(fvec4)
113         24(inv):     23(ptr) Variable Input
114              28:   10(float) Constant 1065353216
115              31:             TypeInt 32 0
116              32:     31(int) Constant 0
117              33:             TypePointer Function 10(float)
118              36:   10(float) Constant 1077936128
119              37:             TypeBool
120              45:   10(float) Constant 1073741824
121              51:             TypePointer Output 11(fvec4)
122        52(outv):     51(ptr) Variable Output
123           53(S):             TypeStruct 7(int)
124        54(ubuf):             TypeStruct 53(S)
125              55:             TypePointer Uniform 54(ubuf)
126              56:     55(ptr) Variable Uniform
127              58:             TypePointer Uniform 53(S)
128              64:             TypeImage 10(float) 2D sampled format:Unknown
129              65:             TypeSampledImage 64
130              66:             TypePointer UniformConstant 65
131         67(s2d):     66(ptr) Variable UniformConstant
132              69:             TypeVector 10(float) 2
133              70:   10(float) Constant 1056964608
134              71:   69(fvec2) ConstantComposite 70 70
135              75:             TypePointer Uniform 7(int)
136             104:      7(int) Constant 10
137             109:      7(int) Constant 1
138             111:             TypePointer Output 10(float)
139             114:   10(float) Constant 1092616192
140         5(main):           3 Function None 4
141               6:             Label
142       57(param):      9(ptr) Variable Function
143           97(i):     19(ptr) Variable Function
144             116:     16(ptr) Variable Function
145                              Line 1 30 0
146              59:     58(ptr) AccessChain 56 18
147              60:       53(S) Load 59
148              61:      7(int) CompositeExtract 60 0
149              62:     19(ptr) AccessChain 57(param) 18
150                              Store 62 61
151              63:   11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param)
152                              Store 52(outv) 63
153                              Line 1 31 0
154              68:          65 Load 67(s2d)
155              72:   11(fvec4) ImageSampleImplicitLod 68 71
156              73:   11(fvec4) Load 52(outv)
157              74:   11(fvec4) FAdd 73 72
158                              Store 52(outv) 74
159                              Line 1 33 0
160              76:     75(ptr) AccessChain 56 18 18
161              77:      7(int) Load 76
162                              SelectionMerge 81 None
163                              Switch 77 80
164                                     case 10: 78
165                                     case 20: 79
166              80:               Label
167                                Line 1 42 0
168              92:   11(fvec4)   Load 52(outv)
169              93:   11(fvec4)   CompositeConstruct 28 28 28 28
170              94:   11(fvec4)   FSub 92 93
171                                Store 52(outv) 94
172                                Line 1 43 0
173                                Branch 81
174              78:               Label
175                                Line 1 35 0
176              82:   11(fvec4)   Load 52(outv)
177              83:   11(fvec4)   CompositeConstruct 28 28 28 28
178              84:   11(fvec4)   FAdd 82 83
179                                Store 52(outv) 84
180                                Line 1 36 0
181                                Branch 81
182              79:               Label
183                                Line 1 38 0
184              86:   11(fvec4)   Load 52(outv)
185              87:   11(fvec4)   VectorTimesScalar 86 45
186                                Store 52(outv) 87
187                                Line 1 39 0
188              88:   11(fvec4)   Load 52(outv)
189              89:   11(fvec4)   CompositeConstruct 28 28 28 28
190              90:   11(fvec4)   FAdd 88 89
191                                Store 52(outv) 90
192                                Line 1 40 0
193                                Branch 81
194              81:             Label
195                              Line 1 46 0
196                              Store 97(i) 18
197                              Branch 98
198              98:             Label
199                              LoopMerge 100 101 None
200                              Branch 102
201             102:             Label
202             103:      7(int) Load 97(i)
203             105:    37(bool) SLessThan 103 104
204                              BranchConditional 105 99 100
205              99:               Label
206                                Line 1 47 0
207             106:   11(fvec4)   Load 52(outv)
208             107:   11(fvec4)   VectorTimesScalar 106 36
209                                Store 52(outv) 107
210                                Branch 101
211             101:               Label
212                                Line 1 46 0
213             108:      7(int)   Load 97(i)
214             110:      7(int)   IAdd 108 109
215                                Store 97(i) 110
216                                Branch 98
217             100:             Label
218                              Line 1 49 0
219             112:    111(ptr) AccessChain 52(outv) 32
220             113:   10(float) Load 112
221             115:    37(bool) FOrdLessThan 113 114
222                              SelectionMerge 118 None
223                              BranchConditional 115 117 121
224             117:               Label
225                                Line 1 50 0
226             119:   11(fvec4)   Load 52(outv)
227             120:   11(fvec4)   ExtInst 2(GLSL.std.450) 13(Sin) 119
228                                Store 52(outv) 120
229                                Store 116 120
230                                Branch 118
231             121:               Label
232                                Line 1 51 0
233             122:   11(fvec4)   Load 52(outv)
234             123:   11(fvec4)   ExtInst 2(GLSL.std.450) 14(Cos) 122
235                                Store 52(outv) 123
236                                Store 116 123
237                                Branch 118
238             118:             Label
239                              Return
240                              FunctionEnd
24114(foo(struct-S-i11;):   11(fvec4) Function None 12
242           13(s):      9(ptr) FunctionParameter
243              15:             Label
244           17(r):     16(ptr) Variable Function
245                              Line 1 18 0
246              20:     19(ptr) AccessChain 13(s) 18
247              21:      7(int) Load 20
248              22:   10(float) ConvertSToF 21
249              25:   11(fvec4) Load 24(inv)
250              26:   11(fvec4) VectorTimesScalar 25 22
251                              Store 17(r) 26
252                              Line 1 19 0
253              27:   11(fvec4) Load 17(r)
254              29:   11(fvec4) CompositeConstruct 28 28 28 28
255              30:   11(fvec4) FAdd 27 29
256                              Store 17(r) 30
257                              Line 1 20 0
258              34:     33(ptr) AccessChain 17(r) 32
259              35:   10(float) Load 34
260              38:    37(bool) FOrdGreaterThan 35 36
261                              SelectionMerge 40 None
262                              BranchConditional 38 39 44
263              39:               Label
264                                Line 1 21 0
265              41:   11(fvec4)   Load 17(r)
266              42:   11(fvec4)   CompositeConstruct 28 28 28 28
267              43:   11(fvec4)   FSub 41 42
268                                Store 17(r) 43
269                                Branch 40
270              44:               Label
271                                Line 1 23 0
272              46:   11(fvec4)   Load 17(r)
273              47:   11(fvec4)   VectorTimesScalar 46 45
274                                Store 17(r) 47
275                                Branch 40
276              40:             Label
277                              Line 1 25 0
278              48:   11(fvec4) Load 17(r)
279                              ReturnValue 48
280                              FunctionEnd
281