aboutsummaryrefslogtreecommitdiff
path: root/Test/baseResults/spv.debugInfo.1.1.frag.out
blob: 78044ff2cf7be13d91b9e02653c752261621ea0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
spv.debugInfo.frag
// Module Version 10300
// Generated by (magic number): 8000a
// Id's are bound by 124

                              Capability Shader
               2:             ExtInstImport  "GLSL.std.450"
                              MemoryModel Logical GLSL450
                              EntryPoint Fragment 5  "main" 24 52
                              ExecutionMode 5 OriginUpperLeft
               1:             String  "spv.debugInfo.frag"
                              Source GLSL 450 1  "#version 450

struct S {
    int a;
};

uniform ubuf {
    S s;
};

uniform sampler2D s2d;

layout(location = 0) in vec4 inv;
layout(location = 0) out vec4 outv;

vec4 foo(S s)
{
    vec4 r = s.a * inv;
    ++r;
    if (r.x > 3.0)
        --r;
    else
        r *= 2;

    return r;
}

void main()
{
    outv = foo(s);
    outv += texture(s2d, vec2(0.5));

    switch (s.a) {
    case 10:
        ++outv;
        break;
    case 20:
        outv = 2 * outv;
        ++outv;
        break;
    default:
        --outv;
        break;
    }

    for (int i = 0; i < 10; ++i)
        outv *= 3.0;

    outv.x < 10.0 ?
        outv = sin(outv) :
        outv = cos(outv);
}"
                              Name 5  "main"
                              Name 8  "S"
                              MemberName 8(S) 0  "a"
                              Name 14  "foo(struct-S-i11;"
                              Name 13  "s"
                              Name 17  "r"
                              Name 24  "inv"
                              Name 52  "outv"
                              Name 53  "S"
                              MemberName 53(S) 0  "a"
                              Name 54  "ubuf"
                              MemberName 54(ubuf) 0  "s"
                              Name 56  ""
                              Name 57  "param"
                              Name 67  "s2d"
                              Name 97  "i"
                              ModuleProcessed  "no-storage-format"
                              ModuleProcessed  "resource-set-binding 3"
                              ModuleProcessed  "auto-map-bindings"
                              ModuleProcessed  "auto-map-locations"
                              ModuleProcessed  "client vulkan100"
                              ModuleProcessed  "target-env spirv1.3"
                              ModuleProcessed  "target-env vulkan1.1"
                              ModuleProcessed  "relaxed-errors"
                              ModuleProcessed  "suppress-warnings"
                              ModuleProcessed  "hlsl-offsets"
                              ModuleProcessed  "entry-point main"
                              Decorate 24(inv) Location 0
                              Decorate 52(outv) Location 0
                              MemberDecorate 53(S) 0 Offset 0
                              MemberDecorate 54(ubuf) 0 Offset 0
                              Decorate 54(ubuf) Block
                              Decorate 56 DescriptorSet 3
                              Decorate 56 Binding 0
                              Decorate 67(s2d) DescriptorSet 3
                              Decorate 67(s2d) Binding 1
               3:             TypeVoid
               4:             TypeFunction 3
               7:             TypeInt 32 1
            8(S):             TypeStruct 7(int)
               9:             TypePointer Function 8(S)
              10:             TypeFloat 32
              11:             TypeVector 10(float) 4
              12:             TypeFunction 11(fvec4) 9(ptr)
              16:             TypePointer Function 11(fvec4)
              18:      7(int) Constant 0
              19:             TypePointer Function 7(int)
              23:             TypePointer Input 11(fvec4)
         24(inv):     23(ptr) Variable Input
              28:   10(float) Constant 1065353216
              31:             TypeInt 32 0
              32:     31(int) Constant 0
              33:             TypePointer Function 10(float)
              36:   10(float) Constant 1077936128
              37:             TypeBool
              45:   10(float) Constant 1073741824
              51:             TypePointer Output 11(fvec4)
        52(outv):     51(ptr) Variable Output
           53(S):             TypeStruct 7(int)
        54(ubuf):             TypeStruct 53(S)
              55:             TypePointer Uniform 54(ubuf)
              56:     55(ptr) Variable Uniform
              58:             TypePointer Uniform 53(S)
              64:             TypeImage 10(float) 2D sampled format:Unknown
              65:             TypeSampledImage 64
              66:             TypePointer UniformConstant 65
         67(s2d):     66(ptr) Variable UniformConstant
              69:             TypeVector 10(float) 2
              70:   10(float) Constant 1056964608
              71:   69(fvec2) ConstantComposite 70 70
              75:             TypePointer Uniform 7(int)
             104:      7(int) Constant 10
             109:      7(int) Constant 1
             111:             TypePointer Output 10(float)
             114:   10(float) Constant 1092616192
         5(main):           3 Function None 4
               6:             Label
       57(param):      9(ptr) Variable Function
           97(i):     19(ptr) Variable Function
             116:     16(ptr) Variable Function
                              Line 1 30 0
              59:     58(ptr) AccessChain 56 18
              60:       53(S) Load 59
              61:      7(int) CompositeExtract 60 0
              62:     19(ptr) AccessChain 57(param) 18
                              Store 62 61
              63:   11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param)
                              Store 52(outv) 63
                              Line 1 31 0
              68:          65 Load 67(s2d)
              72:   11(fvec4) ImageSampleImplicitLod 68 71
              73:   11(fvec4) Load 52(outv)
              74:   11(fvec4) FAdd 73 72
                              Store 52(outv) 74
                              Line 1 33 0
              76:     75(ptr) AccessChain 56 18 18
              77:      7(int) Load 76
                              SelectionMerge 81 None
                              Switch 77 80 
                                     case 10: 78
                                     case 20: 79
              80:               Label
                                Line 1 42 0
              92:   11(fvec4)   Load 52(outv)
              93:   11(fvec4)   CompositeConstruct 28 28 28 28
              94:   11(fvec4)   FSub 92 93
                                Store 52(outv) 94
                                Line 1 43 0
                                Branch 81
              78:               Label
                                Line 1 35 0
              82:   11(fvec4)   Load 52(outv)
              83:   11(fvec4)   CompositeConstruct 28 28 28 28
              84:   11(fvec4)   FAdd 82 83
                                Store 52(outv) 84
                                Line 1 36 0
                                Branch 81
              79:               Label
                                Line 1 38 0
              86:   11(fvec4)   Load 52(outv)
              87:   11(fvec4)   VectorTimesScalar 86 45
                                Store 52(outv) 87
                                Line 1 39 0
              88:   11(fvec4)   Load 52(outv)
              89:   11(fvec4)   CompositeConstruct 28 28 28 28
              90:   11(fvec4)   FAdd 88 89
                                Store 52(outv) 90
                                Line 1 40 0
                                Branch 81
              81:             Label
                              Line 1 46 0
                              Store 97(i) 18
                              Branch 98
              98:             Label
                              LoopMerge 100 101 None
                              Branch 102
             102:             Label
             103:      7(int) Load 97(i)
             105:    37(bool) SLessThan 103 104
                              BranchConditional 105 99 100
              99:               Label
                                Line 1 47 0
             106:   11(fvec4)   Load 52(outv)
             107:   11(fvec4)   VectorTimesScalar 106 36
                                Store 52(outv) 107
                                Branch 101
             101:               Label
                                Line 1 46 0
             108:      7(int)   Load 97(i)
             110:      7(int)   IAdd 108 109
                                Store 97(i) 110
                                Branch 98
             100:             Label
                              Line 1 49 0
             112:    111(ptr) AccessChain 52(outv) 32
             113:   10(float) Load 112
             115:    37(bool) FOrdLessThan 113 114
                              SelectionMerge 118 None
                              BranchConditional 115 117 121
             117:               Label
                                Line 1 50 0
             119:   11(fvec4)   Load 52(outv)
             120:   11(fvec4)   ExtInst 2(GLSL.std.450) 13(Sin) 119
                                Store 52(outv) 120
                                Store 116 120
                                Branch 118
             121:               Label
                                Line 1 51 0
             122:   11(fvec4)   Load 52(outv)
             123:   11(fvec4)   ExtInst 2(GLSL.std.450) 14(Cos) 122
                                Store 52(outv) 123
                                Store 116 123
                                Branch 118
             118:             Label
                              Return
                              FunctionEnd
14(foo(struct-S-i11;):   11(fvec4) Function None 12
           13(s):      9(ptr) FunctionParameter
              15:             Label
           17(r):     16(ptr) Variable Function
                              Line 1 18 0
              20:     19(ptr) AccessChain 13(s) 18
              21:      7(int) Load 20
              22:   10(float) ConvertSToF 21
              25:   11(fvec4) Load 24(inv)
              26:   11(fvec4) VectorTimesScalar 25 22
                              Store 17(r) 26
                              Line 1 19 0
              27:   11(fvec4) Load 17(r)
              29:   11(fvec4) CompositeConstruct 28 28 28 28
              30:   11(fvec4) FAdd 27 29
                              Store 17(r) 30
                              Line 1 20 0
              34:     33(ptr) AccessChain 17(r) 32
              35:   10(float) Load 34
              38:    37(bool) FOrdGreaterThan 35 36
                              SelectionMerge 40 None
                              BranchConditional 38 39 44
              39:               Label
                                Line 1 21 0
              41:   11(fvec4)   Load 17(r)
              42:   11(fvec4)   CompositeConstruct 28 28 28 28
              43:   11(fvec4)   FSub 41 42
                                Store 17(r) 43
                                Branch 40
              44:               Label
                                Line 1 23 0
              46:   11(fvec4)   Load 17(r)
              47:   11(fvec4)   VectorTimesScalar 46 45
                                Store 17(r) 47
                                Branch 40
              40:             Label
                              Line 1 25 0
              48:   11(fvec4) Load 17(r)
                              ReturnValue 48
                              FunctionEnd