Full vector and fully specified vector swizzle stores are not affected by this change, only partial swizzles ie swizzles with fewer components than the vector being stored to. Previously the vector being stored to loaded and any components not specified in the swizzle were used to create a full store to the vector. While this change generates more SPIR-V instructions, it is necessary for correctness. Fixes #2518.
413 lines
20 KiB
Plaintext
413 lines
20 KiB
Plaintext
spv.intOps.vert
|
|
// Module Version 10000
|
|
// Generated by (magic number): 8000a
|
|
// Id's are bound by 302
|
|
|
|
Capability Shader
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Vertex 4 "main" 9 15 21 26 53 72 88 105 137 156 160 172 189 202 281
|
|
Source ESSL 310
|
|
Name 4 "main"
|
|
Name 9 "iout"
|
|
Name 15 "uout"
|
|
Name 21 "fout"
|
|
Name 26 "u2"
|
|
Name 30 "u2out"
|
|
Name 31 "ResType"
|
|
Name 53 "u1"
|
|
Name 57 "u1out"
|
|
Name 58 "ResType"
|
|
Name 72 "u4"
|
|
Name 76 "u4outHi"
|
|
Name 77 "u4outLow"
|
|
Name 78 "ResType"
|
|
Name 88 "i4"
|
|
Name 92 "i4outHi"
|
|
Name 93 "i4outLow"
|
|
Name 94 "ResType"
|
|
Name 105 "v3"
|
|
Name 109 "i3out"
|
|
Name 110 "ResType"
|
|
Name 137 "v1"
|
|
Name 140 "i1out"
|
|
Name 141 "ResType"
|
|
Name 156 "v2"
|
|
Name 160 "i2"
|
|
Name 172 "i1"
|
|
Name 189 "u3"
|
|
Name 202 "i3"
|
|
Name 281 "v4"
|
|
Decorate 9(iout) Location 1
|
|
Decorate 15(uout) Location 0
|
|
Decorate 21(fout) Location 2
|
|
Decorate 26(u2) Location 1
|
|
Decorate 53(u1) Location 0
|
|
Decorate 72(u4) Location 3
|
|
Decorate 88(i4) Location 11
|
|
Decorate 105(v3) Location 6
|
|
Decorate 137(v1) Location 4
|
|
Decorate 156(v2) Location 5
|
|
Decorate 160(i2) Location 9
|
|
Decorate 172(i1) Location 8
|
|
Decorate 189(u3) Location 2
|
|
Decorate 202(i3) Location 10
|
|
Decorate 281(v4) Location 7
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
6: TypeInt 32 1
|
|
7: TypeVector 6(int) 4
|
|
8: TypePointer Output 7(ivec4)
|
|
9(iout): 8(ptr) Variable Output
|
|
10: 6(int) Constant 0
|
|
11: 7(ivec4) ConstantComposite 10 10 10 10
|
|
12: TypeInt 32 0
|
|
13: TypeVector 12(int) 4
|
|
14: TypePointer Output 13(ivec4)
|
|
15(uout): 14(ptr) Variable Output
|
|
16: 12(int) Constant 0
|
|
17: 13(ivec4) ConstantComposite 16 16 16 16
|
|
18: TypeFloat 32
|
|
19: TypeVector 18(float) 4
|
|
20: TypePointer Output 19(fvec4)
|
|
21(fout): 20(ptr) Variable Output
|
|
22: 18(float) Constant 0
|
|
23: 19(fvec4) ConstantComposite 22 22 22 22
|
|
24: TypeVector 12(int) 2
|
|
25: TypePointer Input 24(ivec2)
|
|
26(u2): 25(ptr) Variable Input
|
|
29: TypePointer Function 24(ivec2)
|
|
31(ResType): TypeStruct 24(ivec2) 24(ivec2)
|
|
38: TypePointer Output 12(int)
|
|
41: 12(int) Constant 1
|
|
52: TypePointer Input 12(int)
|
|
53(u1): 52(ptr) Variable Input
|
|
56: TypePointer Function 12(int)
|
|
58(ResType): TypeStruct 12(int) 12(int)
|
|
71: TypePointer Input 13(ivec4)
|
|
72(u4): 71(ptr) Variable Input
|
|
75: TypePointer Function 13(ivec4)
|
|
78(ResType): TypeStruct 13(ivec4) 13(ivec4)
|
|
87: TypePointer Input 7(ivec4)
|
|
88(i4): 87(ptr) Variable Input
|
|
91: TypePointer Function 7(ivec4)
|
|
94(ResType): TypeStruct 7(ivec4) 7(ivec4)
|
|
103: TypeVector 18(float) 3
|
|
104: TypePointer Input 103(fvec3)
|
|
105(v3): 104(ptr) Variable Input
|
|
107: TypeVector 6(int) 3
|
|
108: TypePointer Function 107(ivec3)
|
|
110(ResType): TypeStruct 103(fvec3) 107(ivec3)
|
|
117: TypePointer Output 18(float)
|
|
122: 12(int) Constant 2
|
|
129: TypePointer Output 6(int)
|
|
136: TypePointer Input 18(float)
|
|
137(v1): 136(ptr) Variable Input
|
|
139: TypePointer Function 6(int)
|
|
141(ResType): TypeStruct 18(float) 6(int)
|
|
154: TypeVector 18(float) 2
|
|
155: TypePointer Input 154(fvec2)
|
|
156(v2): 155(ptr) Variable Input
|
|
158: TypeVector 6(int) 2
|
|
159: TypePointer Input 158(ivec2)
|
|
160(i2): 159(ptr) Variable Input
|
|
171: TypePointer Input 6(int)
|
|
172(i1): 171(ptr) Variable Input
|
|
180: 6(int) Constant 4
|
|
181: 6(int) Constant 5
|
|
187: TypeVector 12(int) 3
|
|
188: TypePointer Input 187(ivec3)
|
|
189(u3): 188(ptr) Variable Input
|
|
201: TypePointer Input 107(ivec3)
|
|
202(i3): 201(ptr) Variable Input
|
|
280: TypePointer Input 19(fvec4)
|
|
281(v4): 280(ptr) Variable Input
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
30(u2out): 29(ptr) Variable Function
|
|
57(u1out): 56(ptr) Variable Function
|
|
76(u4outHi): 75(ptr) Variable Function
|
|
77(u4outLow): 75(ptr) Variable Function
|
|
92(i4outHi): 91(ptr) Variable Function
|
|
93(i4outLow): 91(ptr) Variable Function
|
|
109(i3out): 108(ptr) Variable Function
|
|
140(i1out): 139(ptr) Variable Function
|
|
Store 9(iout) 11
|
|
Store 15(uout) 17
|
|
Store 21(fout) 23
|
|
27: 24(ivec2) Load 26(u2)
|
|
28: 24(ivec2) Load 26(u2)
|
|
32: 31(ResType) IAddCarry 27 28
|
|
33: 24(ivec2) CompositeExtract 32 1
|
|
Store 30(u2out) 33
|
|
34: 24(ivec2) CompositeExtract 32 0
|
|
35: 13(ivec4) Load 15(uout)
|
|
36: 24(ivec2) VectorShuffle 35 35 0 1
|
|
37: 24(ivec2) IAdd 36 34
|
|
39: 38(ptr) AccessChain 15(uout) 16
|
|
40: 12(int) CompositeExtract 37 0
|
|
Store 39 40
|
|
42: 38(ptr) AccessChain 15(uout) 41
|
|
43: 12(int) CompositeExtract 37 1
|
|
Store 42 43
|
|
44: 24(ivec2) Load 30(u2out)
|
|
45: 13(ivec4) Load 15(uout)
|
|
46: 24(ivec2) VectorShuffle 45 45 0 1
|
|
47: 24(ivec2) IAdd 46 44
|
|
48: 38(ptr) AccessChain 15(uout) 16
|
|
49: 12(int) CompositeExtract 47 0
|
|
Store 48 49
|
|
50: 38(ptr) AccessChain 15(uout) 41
|
|
51: 12(int) CompositeExtract 47 1
|
|
Store 50 51
|
|
54: 12(int) Load 53(u1)
|
|
55: 12(int) Load 53(u1)
|
|
59: 58(ResType) ISubBorrow 54 55
|
|
60: 12(int) CompositeExtract 59 1
|
|
Store 57(u1out) 60
|
|
61: 12(int) CompositeExtract 59 0
|
|
62: 38(ptr) AccessChain 15(uout) 16
|
|
63: 12(int) Load 62
|
|
64: 12(int) IAdd 63 61
|
|
65: 38(ptr) AccessChain 15(uout) 16
|
|
Store 65 64
|
|
66: 12(int) Load 57(u1out)
|
|
67: 38(ptr) AccessChain 15(uout) 16
|
|
68: 12(int) Load 67
|
|
69: 12(int) IAdd 68 66
|
|
70: 38(ptr) AccessChain 15(uout) 16
|
|
Store 70 69
|
|
73: 13(ivec4) Load 72(u4)
|
|
74: 13(ivec4) Load 72(u4)
|
|
79: 78(ResType) UMulExtended 73 74
|
|
80: 13(ivec4) CompositeExtract 79 0
|
|
Store 77(u4outLow) 80
|
|
81: 13(ivec4) CompositeExtract 79 1
|
|
Store 76(u4outHi) 81
|
|
82: 13(ivec4) Load 76(u4outHi)
|
|
83: 13(ivec4) Load 77(u4outLow)
|
|
84: 13(ivec4) IAdd 82 83
|
|
85: 13(ivec4) Load 15(uout)
|
|
86: 13(ivec4) IAdd 85 84
|
|
Store 15(uout) 86
|
|
89: 7(ivec4) Load 88(i4)
|
|
90: 7(ivec4) Load 88(i4)
|
|
95: 94(ResType) SMulExtended 89 90
|
|
96: 7(ivec4) CompositeExtract 95 0
|
|
Store 93(i4outLow) 96
|
|
97: 7(ivec4) CompositeExtract 95 1
|
|
Store 92(i4outHi) 97
|
|
98: 7(ivec4) Load 93(i4outLow)
|
|
99: 7(ivec4) Load 92(i4outHi)
|
|
100: 7(ivec4) IAdd 98 99
|
|
101: 7(ivec4) Load 9(iout)
|
|
102: 7(ivec4) IAdd 101 100
|
|
Store 9(iout) 102
|
|
106: 103(fvec3) Load 105(v3)
|
|
111:110(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 106
|
|
112: 107(ivec3) CompositeExtract 111 1
|
|
Store 109(i3out) 112
|
|
113: 103(fvec3) CompositeExtract 111 0
|
|
114: 19(fvec4) Load 21(fout)
|
|
115: 103(fvec3) VectorShuffle 114 114 0 1 2
|
|
116: 103(fvec3) FAdd 115 113
|
|
118: 117(ptr) AccessChain 21(fout) 16
|
|
119: 18(float) CompositeExtract 116 0
|
|
Store 118 119
|
|
120: 117(ptr) AccessChain 21(fout) 41
|
|
121: 18(float) CompositeExtract 116 1
|
|
Store 120 121
|
|
123: 117(ptr) AccessChain 21(fout) 122
|
|
124: 18(float) CompositeExtract 116 2
|
|
Store 123 124
|
|
125: 107(ivec3) Load 109(i3out)
|
|
126: 7(ivec4) Load 9(iout)
|
|
127: 107(ivec3) VectorShuffle 126 126 0 1 2
|
|
128: 107(ivec3) IAdd 127 125
|
|
130: 129(ptr) AccessChain 9(iout) 16
|
|
131: 6(int) CompositeExtract 128 0
|
|
Store 130 131
|
|
132: 129(ptr) AccessChain 9(iout) 41
|
|
133: 6(int) CompositeExtract 128 1
|
|
Store 132 133
|
|
134: 129(ptr) AccessChain 9(iout) 122
|
|
135: 6(int) CompositeExtract 128 2
|
|
Store 134 135
|
|
138: 18(float) Load 137(v1)
|
|
142:141(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 138
|
|
143: 6(int) CompositeExtract 142 1
|
|
Store 140(i1out) 143
|
|
144: 18(float) CompositeExtract 142 0
|
|
145: 117(ptr) AccessChain 21(fout) 16
|
|
146: 18(float) Load 145
|
|
147: 18(float) FAdd 146 144
|
|
148: 117(ptr) AccessChain 21(fout) 16
|
|
Store 148 147
|
|
149: 6(int) Load 140(i1out)
|
|
150: 129(ptr) AccessChain 9(iout) 16
|
|
151: 6(int) Load 150
|
|
152: 6(int) IAdd 151 149
|
|
153: 129(ptr) AccessChain 9(iout) 16
|
|
Store 153 152
|
|
157: 154(fvec2) Load 156(v2)
|
|
161: 158(ivec2) Load 160(i2)
|
|
162: 154(fvec2) ExtInst 1(GLSL.std.450) 53(Ldexp) 157 161
|
|
163: 19(fvec4) Load 21(fout)
|
|
164: 154(fvec2) VectorShuffle 163 163 0 1
|
|
165: 154(fvec2) FAdd 164 162
|
|
166: 117(ptr) AccessChain 21(fout) 16
|
|
167: 18(float) CompositeExtract 165 0
|
|
Store 166 167
|
|
168: 117(ptr) AccessChain 21(fout) 41
|
|
169: 18(float) CompositeExtract 165 1
|
|
Store 168 169
|
|
170: 18(float) Load 137(v1)
|
|
173: 6(int) Load 172(i1)
|
|
174: 18(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 170 173
|
|
175: 117(ptr) AccessChain 21(fout) 16
|
|
176: 18(float) Load 175
|
|
177: 18(float) FAdd 176 174
|
|
178: 117(ptr) AccessChain 21(fout) 16
|
|
Store 178 177
|
|
179: 6(int) Load 172(i1)
|
|
182: 6(int) BitFieldSExtract 179 180 181
|
|
183: 129(ptr) AccessChain 9(iout) 16
|
|
184: 6(int) Load 183
|
|
185: 6(int) IAdd 184 182
|
|
186: 129(ptr) AccessChain 9(iout) 16
|
|
Store 186 185
|
|
190: 187(ivec3) Load 189(u3)
|
|
191: 187(ivec3) BitFieldUExtract 190 180 181
|
|
192: 13(ivec4) Load 15(uout)
|
|
193: 187(ivec3) VectorShuffle 192 192 0 1 2
|
|
194: 187(ivec3) IAdd 193 191
|
|
195: 38(ptr) AccessChain 15(uout) 16
|
|
196: 12(int) CompositeExtract 194 0
|
|
Store 195 196
|
|
197: 38(ptr) AccessChain 15(uout) 41
|
|
198: 12(int) CompositeExtract 194 1
|
|
Store 197 198
|
|
199: 38(ptr) AccessChain 15(uout) 122
|
|
200: 12(int) CompositeExtract 194 2
|
|
Store 199 200
|
|
203: 107(ivec3) Load 202(i3)
|
|
204: 107(ivec3) Load 202(i3)
|
|
205: 107(ivec3) BitFieldInsert 203 204 180 181
|
|
206: 7(ivec4) Load 9(iout)
|
|
207: 107(ivec3) VectorShuffle 206 206 0 1 2
|
|
208: 107(ivec3) IAdd 207 205
|
|
209: 129(ptr) AccessChain 9(iout) 16
|
|
210: 6(int) CompositeExtract 208 0
|
|
Store 209 210
|
|
211: 129(ptr) AccessChain 9(iout) 41
|
|
212: 6(int) CompositeExtract 208 1
|
|
Store 211 212
|
|
213: 129(ptr) AccessChain 9(iout) 122
|
|
214: 6(int) CompositeExtract 208 2
|
|
Store 213 214
|
|
215: 12(int) Load 53(u1)
|
|
216: 12(int) Load 53(u1)
|
|
217: 12(int) BitFieldInsert 215 216 180 181
|
|
218: 38(ptr) AccessChain 15(uout) 16
|
|
219: 12(int) Load 218
|
|
220: 12(int) IAdd 219 217
|
|
221: 38(ptr) AccessChain 15(uout) 16
|
|
Store 221 220
|
|
222: 158(ivec2) Load 160(i2)
|
|
223: 158(ivec2) BitReverse 222
|
|
224: 7(ivec4) Load 9(iout)
|
|
225: 158(ivec2) VectorShuffle 224 224 0 1
|
|
226: 158(ivec2) IAdd 225 223
|
|
227: 129(ptr) AccessChain 9(iout) 16
|
|
228: 6(int) CompositeExtract 226 0
|
|
Store 227 228
|
|
229: 129(ptr) AccessChain 9(iout) 41
|
|
230: 6(int) CompositeExtract 226 1
|
|
Store 229 230
|
|
231: 13(ivec4) Load 72(u4)
|
|
232: 13(ivec4) BitReverse 231
|
|
233: 13(ivec4) Load 15(uout)
|
|
234: 13(ivec4) IAdd 233 232
|
|
Store 15(uout) 234
|
|
235: 6(int) Load 172(i1)
|
|
236: 6(int) BitCount 235
|
|
237: 129(ptr) AccessChain 9(iout) 16
|
|
238: 6(int) Load 237
|
|
239: 6(int) IAdd 238 236
|
|
240: 129(ptr) AccessChain 9(iout) 16
|
|
Store 240 239
|
|
241: 187(ivec3) Load 189(u3)
|
|
242: 107(ivec3) BitCount 241
|
|
243: 7(ivec4) Load 9(iout)
|
|
244: 107(ivec3) VectorShuffle 243 243 0 1 2
|
|
245: 107(ivec3) IAdd 244 242
|
|
246: 129(ptr) AccessChain 9(iout) 16
|
|
247: 6(int) CompositeExtract 245 0
|
|
Store 246 247
|
|
248: 129(ptr) AccessChain 9(iout) 41
|
|
249: 6(int) CompositeExtract 245 1
|
|
Store 248 249
|
|
250: 129(ptr) AccessChain 9(iout) 122
|
|
251: 6(int) CompositeExtract 245 2
|
|
Store 250 251
|
|
252: 158(ivec2) Load 160(i2)
|
|
253: 158(ivec2) ExtInst 1(GLSL.std.450) 73(FindILsb) 252
|
|
254: 7(ivec4) Load 9(iout)
|
|
255: 158(ivec2) VectorShuffle 254 254 0 1
|
|
256: 158(ivec2) IAdd 255 253
|
|
257: 129(ptr) AccessChain 9(iout) 16
|
|
258: 6(int) CompositeExtract 256 0
|
|
Store 257 258
|
|
259: 129(ptr) AccessChain 9(iout) 41
|
|
260: 6(int) CompositeExtract 256 1
|
|
Store 259 260
|
|
261: 13(ivec4) Load 72(u4)
|
|
262: 7(ivec4) ExtInst 1(GLSL.std.450) 73(FindILsb) 261
|
|
263: 7(ivec4) Load 9(iout)
|
|
264: 7(ivec4) IAdd 263 262
|
|
Store 9(iout) 264
|
|
265: 6(int) Load 172(i1)
|
|
266: 6(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 265
|
|
267: 129(ptr) AccessChain 9(iout) 16
|
|
268: 6(int) Load 267
|
|
269: 6(int) IAdd 268 266
|
|
270: 129(ptr) AccessChain 9(iout) 16
|
|
Store 270 269
|
|
271: 24(ivec2) Load 26(u2)
|
|
272: 158(ivec2) ExtInst 1(GLSL.std.450) 75(FindUMsb) 271
|
|
273: 7(ivec4) Load 9(iout)
|
|
274: 158(ivec2) VectorShuffle 273 273 0 1
|
|
275: 158(ivec2) IAdd 274 272
|
|
276: 129(ptr) AccessChain 9(iout) 16
|
|
277: 6(int) CompositeExtract 275 0
|
|
Store 276 277
|
|
278: 129(ptr) AccessChain 9(iout) 41
|
|
279: 6(int) CompositeExtract 275 1
|
|
Store 278 279
|
|
282: 19(fvec4) Load 281(v4)
|
|
283: 12(int) ExtInst 1(GLSL.std.450) 55(PackUnorm4x8) 282
|
|
284: 38(ptr) AccessChain 15(uout) 16
|
|
285: 12(int) Load 284
|
|
286: 12(int) IAdd 285 283
|
|
287: 38(ptr) AccessChain 15(uout) 16
|
|
Store 287 286
|
|
288: 19(fvec4) Load 281(v4)
|
|
289: 12(int) ExtInst 1(GLSL.std.450) 54(PackSnorm4x8) 288
|
|
290: 38(ptr) AccessChain 15(uout) 16
|
|
291: 12(int) Load 290
|
|
292: 12(int) IAdd 291 289
|
|
293: 38(ptr) AccessChain 15(uout) 16
|
|
Store 293 292
|
|
294: 12(int) Load 53(u1)
|
|
295: 19(fvec4) ExtInst 1(GLSL.std.450) 64(UnpackUnorm4x8) 294
|
|
296: 19(fvec4) Load 21(fout)
|
|
297: 19(fvec4) FAdd 296 295
|
|
Store 21(fout) 297
|
|
298: 12(int) Load 53(u1)
|
|
299: 19(fvec4) ExtInst 1(GLSL.std.450) 63(UnpackSnorm4x8) 298
|
|
300: 19(fvec4) Load 21(fout)
|
|
301: 19(fvec4) FAdd 300 299
|
|
Store 21(fout) 301
|
|
Return
|
|
FunctionEnd
|