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