Allow 8/16-bit integer as array index

Also enable 8/16 bit int capability in SPIR-V in such cases.

Also enable 64 bit capabilities when used in operations.

Fixes #2779
This commit is contained in:
Greg Fischer
2021-10-18 18:28:01 -06:00
parent 6351fcef28
commit 82b2668d58
6 changed files with 988 additions and 924 deletions

View File

@@ -1,7 +1,7 @@
spv.int16.frag
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 535
// Id's are bound by 549
Capability Shader
Capability Float16
@@ -48,53 +48,55 @@ spv.int16.frag
Name 154 "i8v"
Name 163 "u8v"
Name 176 "bv"
Name 195 "u16v"
Name 200 "i16"
Name 220 "i"
Name 227 "uv"
Name 243 "i64"
Name 281 "b"
Name 343 "i16v"
Name 346 "i16"
Name 356 "u16v"
Name 358 "u16"
Name 428 "i32"
Name 431 "i64"
Name 434 "i16v4"
Name 437 "u32"
Name 438 "u16v2"
Name 442 "u64"
Name 445 "u16v4"
Name 457 "bv"
Name 530 "Block"
MemberName 530(Block) 0 "i16"
MemberName 530(Block) 1 "i16v2"
MemberName 530(Block) 2 "i16v3"
MemberName 530(Block) 3 "i16v4"
MemberName 530(Block) 4 "u16"
MemberName 530(Block) 5 "u16v2"
MemberName 530(Block) 6 "u16v3"
MemberName 530(Block) 7 "u16v4"
Name 532 "block"
Name 533 "si16"
Name 534 "su16"
Name 196 "arr"
Name 204 "u16v"
Name 209 "i16"
Name 229 "i"
Name 236 "uv"
Name 252 "i64"
Name 290 "b"
Name 353 "f"
Name 357 "i16v"
Name 360 "i16"
Name 370 "u16v"
Name 372 "u16"
Name 442 "i32"
Name 445 "i64"
Name 448 "i16v4"
Name 451 "u32"
Name 452 "u16v2"
Name 456 "u64"
Name 459 "u16v4"
Name 471 "bv"
Name 544 "Block"
MemberName 544(Block) 0 "i16"
MemberName 544(Block) 1 "i16v2"
MemberName 544(Block) 2 "i16v3"
MemberName 544(Block) 3 "i16v4"
MemberName 544(Block) 4 "u16"
MemberName 544(Block) 5 "u16v2"
MemberName 544(Block) 6 "u16v3"
MemberName 544(Block) 7 "u16v4"
Name 546 "block"
Name 547 "si16"
Name 548 "su16"
MemberDecorate 24(Uniforms) 0 Offset 0
Decorate 24(Uniforms) Block
Decorate 26 DescriptorSet 0
Decorate 26 Binding 0
MemberDecorate 530(Block) 0 Offset 0
MemberDecorate 530(Block) 1 Offset 4
MemberDecorate 530(Block) 2 Offset 8
MemberDecorate 530(Block) 3 Offset 16
MemberDecorate 530(Block) 4 Offset 24
MemberDecorate 530(Block) 5 Offset 28
MemberDecorate 530(Block) 6 Offset 32
MemberDecorate 530(Block) 7 Offset 40
Decorate 530(Block) Block
Decorate 532(block) DescriptorSet 0
Decorate 532(block) Binding 1
Decorate 533(si16) SpecId 100
Decorate 534(su16) SpecId 101
MemberDecorate 544(Block) 0 Offset 0
MemberDecorate 544(Block) 1 Offset 4
MemberDecorate 544(Block) 2 Offset 8
MemberDecorate 544(Block) 3 Offset 16
MemberDecorate 544(Block) 4 Offset 24
MemberDecorate 544(Block) 5 Offset 28
MemberDecorate 544(Block) 6 Offset 32
MemberDecorate 544(Block) 7 Offset 40
Decorate 544(Block) Block
Decorate 546(block) DescriptorSet 0
Decorate 546(block) Binding 1
Decorate 547(si16) SpecId 100
Decorate 548(su16) SpecId 101
2: TypeVoid
3: TypeFunction 2
14: TypeInt 16 1
@@ -160,37 +162,46 @@ spv.int16.frag
185: 36(int16_t) Constant 1
186: 57(i16vec2) ConstantComposite 184 184
187: 57(i16vec2) ConstantComposite 185 185
193: TypeVector 36(int16_t) 3
194: TypePointer Function 193(i16vec3)
197: TypeVector 14(int16_t) 3
219: TypePointer Function 27(int)
225: TypeVector 17(int) 3
226: TypePointer Function 225(ivec3)
242: TypePointer Function 71(int64_t)
264: 17(int) Constant 1
270: 17(int) Constant 2
276: TypeVector 27(int) 3
280: TypePointer Function 173(bool)
282: 17(int) Constant 0
296: TypePointer Function 17(int)
354: 52(i16vec2) ConstantComposite 21 21
363:193(i16vec3) ConstantComposite 184 184 184
405: 173(bool) ConstantTrue
412: 173(bool) ConstantFalse
413: 174(bvec2) ConstantComposite 412 412
425: TypeVector 173(bool) 3
426: 425(bvec3) ConstantComposite 412 412 412
432: TypeVector 14(int16_t) 4
433: TypePointer Function 432(i16vec4)
441: TypePointer Function 77(int64_t)
443: TypeVector 36(int16_t) 4
444: TypePointer Function 443(i16vec4)
456: TypePointer Function 425(bvec3)
530(Block): TypeStruct 14(int16_t) 52(i16vec2) 197(i16vec3) 432(i16vec4) 36(int16_t) 57(i16vec2) 193(i16vec3) 443(i16vec4)
531: TypePointer Uniform 530(Block)
532(block): 531(ptr) Variable Uniform
533(si16): 14(int16_t) SpecConstant 4294967286
534(su16): 36(int16_t) SpecConstant 20
193: 17(int) Constant 4
194: TypeArray 97(float) 193
195: TypePointer Function 194
197: 97(float) Constant 1065353216
198: 97(float) Constant 1073741824
199: 97(float) Constant 1077936128
200: 97(float) Constant 1082130432
201: 194 ConstantComposite 197 198 199 200
202: TypeVector 36(int16_t) 3
203: TypePointer Function 202(i16vec3)
206: TypeVector 14(int16_t) 3
228: TypePointer Function 27(int)
234: TypeVector 17(int) 3
235: TypePointer Function 234(ivec3)
251: TypePointer Function 71(int64_t)
273: 17(int) Constant 1
279: 17(int) Constant 2
285: TypeVector 27(int) 3
289: TypePointer Function 173(bool)
291: 17(int) Constant 0
305: TypePointer Function 17(int)
352: TypePointer Function 97(float)
368: 52(i16vec2) ConstantComposite 21 21
377:202(i16vec3) ConstantComposite 184 184 184
419: 173(bool) ConstantTrue
426: 173(bool) ConstantFalse
427: 174(bvec2) ConstantComposite 426 426
439: TypeVector 173(bool) 3
440: 439(bvec3) ConstantComposite 426 426 426
446: TypeVector 14(int16_t) 4
447: TypePointer Function 446(i16vec4)
455: TypePointer Function 77(int64_t)
457: TypeVector 36(int16_t) 4
458: TypePointer Function 457(i16vec4)
470: TypePointer Function 439(bvec3)
544(Block): TypeStruct 14(int16_t) 52(i16vec2) 206(i16vec3) 446(i16vec4) 36(int16_t) 57(i16vec2) 202(i16vec3) 457(i16vec4)
545: TypePointer Uniform 544(Block)
546(block): 545(ptr) Variable Uniform
547(si16): 14(int16_t) SpecConstant 4294967286
548(su16): 36(int16_t) SpecConstant 20
4(main): 2 Function None 3
5: Label
Return
@@ -364,397 +375,404 @@ spv.int16.frag
FunctionEnd
10(operators(): 2 Function None 3
11: Label
195(u16v): 194(ptr) Variable Function
200(i16): 15(ptr) Variable Function
220(i): 219(ptr) Variable Function
227(uv): 226(ptr) Variable Function
243(i64): 242(ptr) Variable Function
281(b): 280(ptr) Variable Function
196:193(i16vec3) Load 195(u16v)
198:197(i16vec3) CompositeConstruct 179 179 179
199:193(i16vec3) IAdd 196 198
Store 195(u16v) 199
201: 14(int16_t) Load 200(i16)
202: 14(int16_t) ISub 201 179
Store 200(i16) 202
203: 14(int16_t) Load 200(i16)
204: 14(int16_t) IAdd 203 179
Store 200(i16) 204
205:193(i16vec3) Load 195(u16v)
206:197(i16vec3) CompositeConstruct 179 179 179
207:193(i16vec3) ISub 205 206
Store 195(u16v) 207
208:193(i16vec3) Load 195(u16v)
209:193(i16vec3) Not 208
Store 195(u16v) 209
210: 14(int16_t) Load 200(i16)
Store 200(i16) 210
211:193(i16vec3) Load 195(u16v)
212:193(i16vec3) SNegate 211
Store 195(u16v) 212
213: 14(int16_t) Load 200(i16)
214: 14(int16_t) Load 200(i16)
215: 14(int16_t) IAdd 214 213
Store 200(i16) 215
216:193(i16vec3) Load 195(u16v)
217:193(i16vec3) Load 195(u16v)
218:193(i16vec3) ISub 217 216
Store 195(u16v) 218
221: 14(int16_t) Load 200(i16)
222: 27(int) SConvert 221
223: 27(int) Load 220(i)
224: 27(int) IMul 223 222
Store 220(i) 224
228:193(i16vec3) Load 195(u16v)
229: 225(ivec3) UConvert 228
230: 225(ivec3) Load 227(uv)
231: 225(ivec3) UDiv 230 229
Store 227(uv) 231
232: 14(int16_t) Load 200(i16)
233: 27(int) SConvert 232
234: 17(int) Bitcast 233
235: 225(ivec3) Load 227(uv)
236: 225(ivec3) CompositeConstruct 234 234 234
237: 225(ivec3) UMod 235 236
Store 227(uv) 237
238:193(i16vec3) Load 195(u16v)
239: 225(ivec3) UConvert 238
240: 225(ivec3) Load 227(uv)
241: 225(ivec3) IAdd 239 240
Store 227(uv) 241
244: 14(int16_t) Load 200(i16)
245: 71(int64_t) SConvert 244
246: 71(int64_t) Load 243(i64)
247: 71(int64_t) ISub 245 246
Store 243(i64) 247
248:193(i16vec3) Load 195(u16v)
249: 225(ivec3) UConvert 248
250: 225(ivec3) Load 227(uv)
251: 225(ivec3) IMul 249 250
Store 227(uv) 251
252: 14(int16_t) Load 200(i16)
253: 71(int64_t) SConvert 252
254: 71(int64_t) Load 243(i64)
255: 71(int64_t) IMul 253 254
Store 243(i64) 255
256: 14(int16_t) Load 200(i16)
257: 27(int) SConvert 256
258: 27(int) Load 220(i)
259: 27(int) SMod 257 258
Store 220(i) 259
260: 14(int16_t) Load 200(i16)
261:193(i16vec3) Load 195(u16v)
262:197(i16vec3) CompositeConstruct 260 260 260
263:193(i16vec3) ShiftLeftLogical 261 262
Store 195(u16v) 263
265: 37(ptr) AccessChain 195(u16v) 264
266: 36(int16_t) Load 265
267: 14(int16_t) Load 200(i16)
268: 14(int16_t) ShiftRightArithmetic 267 266
Store 200(i16) 268
269: 14(int16_t) Load 200(i16)
271: 37(ptr) AccessChain 195(u16v) 270
272: 36(int16_t) Load 271
273: 14(int16_t) ShiftLeftLogical 269 272
Store 200(i16) 273
274:193(i16vec3) Load 195(u16v)
275: 27(int) Load 220(i)
277: 276(ivec3) CompositeConstruct 275 275 275
278:193(i16vec3) ShiftLeftLogical 274 277
279: 225(ivec3) UConvert 278
Store 227(uv) 279
283: 37(ptr) AccessChain 195(u16v) 282
284: 36(int16_t) Load 283
285: 14(int16_t) Load 200(i16)
286: 36(int16_t) Bitcast 285
287: 173(bool) INotEqual 284 286
Store 281(b) 287
288: 14(int16_t) Load 200(i16)
289: 36(int16_t) Bitcast 288
290: 37(ptr) AccessChain 195(u16v) 282
291: 36(int16_t) Load 290
292: 173(bool) IEqual 289 291
Store 281(b) 292
293: 37(ptr) AccessChain 195(u16v) 282
294: 36(int16_t) Load 293
295: 17(int) UConvert 294
297: 296(ptr) AccessChain 227(uv) 264
298: 17(int) Load 297
299: 173(bool) UGreaterThan 295 298
Store 281(b) 299
300: 14(int16_t) Load 200(i16)
301: 27(int) SConvert 300
302: 27(int) Load 220(i)
303: 173(bool) SLessThan 301 302
Store 281(b) 303
304: 37(ptr) AccessChain 195(u16v) 264
305: 36(int16_t) Load 304
306: 17(int) UConvert 305
307: 296(ptr) AccessChain 227(uv) 282
308: 17(int) Load 307
309: 173(bool) UGreaterThanEqual 306 308
Store 281(b) 309
310: 14(int16_t) Load 200(i16)
311: 27(int) SConvert 310
312: 27(int) Load 220(i)
313: 173(bool) SLessThanEqual 311 312
Store 281(b) 313
314: 14(int16_t) Load 200(i16)
315: 27(int) SConvert 314
316: 17(int) Bitcast 315
317: 225(ivec3) Load 227(uv)
318: 225(ivec3) CompositeConstruct 316 316 316
319: 225(ivec3) BitwiseOr 317 318
Store 227(uv) 319
320: 14(int16_t) Load 200(i16)
321: 27(int) SConvert 320
322: 27(int) Load 220(i)
323: 27(int) BitwiseOr 321 322
Store 220(i) 323
324: 14(int16_t) Load 200(i16)
325: 71(int64_t) SConvert 324
326: 71(int64_t) Load 243(i64)
327: 71(int64_t) BitwiseAnd 326 325
Store 243(i64) 327
328:193(i16vec3) Load 195(u16v)
329: 225(ivec3) UConvert 328
330: 225(ivec3) Load 227(uv)
331: 225(ivec3) BitwiseAnd 329 330
Store 227(uv) 331
332: 14(int16_t) Load 200(i16)
333: 27(int) SConvert 332
334: 17(int) Bitcast 333
335: 225(ivec3) Load 227(uv)
336: 225(ivec3) CompositeConstruct 334 334 334
337: 225(ivec3) BitwiseXor 335 336
Store 227(uv) 337
338:193(i16vec3) Load 195(u16v)
339: 14(int16_t) Load 200(i16)
340: 36(int16_t) Bitcast 339
341:193(i16vec3) CompositeConstruct 340 340 340
342:193(i16vec3) BitwiseXor 338 341
Store 195(u16v) 342
196(arr): 195(ptr) Variable Function
204(u16v): 203(ptr) Variable Function
209(i16): 15(ptr) Variable Function
229(i): 228(ptr) Variable Function
236(uv): 235(ptr) Variable Function
252(i64): 251(ptr) Variable Function
290(b): 289(ptr) Variable Function
353(f): 352(ptr) Variable Function
Store 196(arr) 201
205:202(i16vec3) Load 204(u16v)
207:206(i16vec3) CompositeConstruct 179 179 179
208:202(i16vec3) IAdd 205 207
Store 204(u16v) 208
210: 14(int16_t) Load 209(i16)
211: 14(int16_t) ISub 210 179
Store 209(i16) 211
212: 14(int16_t) Load 209(i16)
213: 14(int16_t) IAdd 212 179
Store 209(i16) 213
214:202(i16vec3) Load 204(u16v)
215:206(i16vec3) CompositeConstruct 179 179 179
216:202(i16vec3) ISub 214 215
Store 204(u16v) 216
217:202(i16vec3) Load 204(u16v)
218:202(i16vec3) Not 217
Store 204(u16v) 218
219: 14(int16_t) Load 209(i16)
Store 209(i16) 219
220:202(i16vec3) Load 204(u16v)
221:202(i16vec3) SNegate 220
Store 204(u16v) 221
222: 14(int16_t) Load 209(i16)
223: 14(int16_t) Load 209(i16)
224: 14(int16_t) IAdd 223 222
Store 209(i16) 224
225:202(i16vec3) Load 204(u16v)
226:202(i16vec3) Load 204(u16v)
227:202(i16vec3) ISub 226 225
Store 204(u16v) 227
230: 14(int16_t) Load 209(i16)
231: 27(int) SConvert 230
232: 27(int) Load 229(i)
233: 27(int) IMul 232 231
Store 229(i) 233
237:202(i16vec3) Load 204(u16v)
238: 234(ivec3) UConvert 237
239: 234(ivec3) Load 236(uv)
240: 234(ivec3) UDiv 239 238
Store 236(uv) 240
241: 14(int16_t) Load 209(i16)
242: 27(int) SConvert 241
243: 17(int) Bitcast 242
244: 234(ivec3) Load 236(uv)
245: 234(ivec3) CompositeConstruct 243 243 243
246: 234(ivec3) UMod 244 245
Store 236(uv) 246
247:202(i16vec3) Load 204(u16v)
248: 234(ivec3) UConvert 247
249: 234(ivec3) Load 236(uv)
250: 234(ivec3) IAdd 248 249
Store 236(uv) 250
253: 14(int16_t) Load 209(i16)
254: 71(int64_t) SConvert 253
255: 71(int64_t) Load 252(i64)
256: 71(int64_t) ISub 254 255
Store 252(i64) 256
257:202(i16vec3) Load 204(u16v)
258: 234(ivec3) UConvert 257
259: 234(ivec3) Load 236(uv)
260: 234(ivec3) IMul 258 259
Store 236(uv) 260
261: 14(int16_t) Load 209(i16)
262: 71(int64_t) SConvert 261
263: 71(int64_t) Load 252(i64)
264: 71(int64_t) IMul 262 263
Store 252(i64) 264
265: 14(int16_t) Load 209(i16)
266: 27(int) SConvert 265
267: 27(int) Load 229(i)
268: 27(int) SMod 266 267
Store 229(i) 268
269: 14(int16_t) Load 209(i16)
270:202(i16vec3) Load 204(u16v)
271:206(i16vec3) CompositeConstruct 269 269 269
272:202(i16vec3) ShiftLeftLogical 270 271
Store 204(u16v) 272
274: 37(ptr) AccessChain 204(u16v) 273
275: 36(int16_t) Load 274
276: 14(int16_t) Load 209(i16)
277: 14(int16_t) ShiftRightArithmetic 276 275
Store 209(i16) 277
278: 14(int16_t) Load 209(i16)
280: 37(ptr) AccessChain 204(u16v) 279
281: 36(int16_t) Load 280
282: 14(int16_t) ShiftLeftLogical 278 281
Store 209(i16) 282
283:202(i16vec3) Load 204(u16v)
284: 27(int) Load 229(i)
286: 285(ivec3) CompositeConstruct 284 284 284
287:202(i16vec3) ShiftLeftLogical 283 286
288: 234(ivec3) UConvert 287
Store 236(uv) 288
292: 37(ptr) AccessChain 204(u16v) 291
293: 36(int16_t) Load 292
294: 14(int16_t) Load 209(i16)
295: 36(int16_t) Bitcast 294
296: 173(bool) INotEqual 293 295
Store 290(b) 296
297: 14(int16_t) Load 209(i16)
298: 36(int16_t) Bitcast 297
299: 37(ptr) AccessChain 204(u16v) 291
300: 36(int16_t) Load 299
301: 173(bool) IEqual 298 300
Store 290(b) 301
302: 37(ptr) AccessChain 204(u16v) 291
303: 36(int16_t) Load 302
304: 17(int) UConvert 303
306: 305(ptr) AccessChain 236(uv) 273
307: 17(int) Load 306
308: 173(bool) UGreaterThan 304 307
Store 290(b) 308
309: 14(int16_t) Load 209(i16)
310: 27(int) SConvert 309
311: 27(int) Load 229(i)
312: 173(bool) SLessThan 310 311
Store 290(b) 312
313: 37(ptr) AccessChain 204(u16v) 273
314: 36(int16_t) Load 313
315: 17(int) UConvert 314
316: 305(ptr) AccessChain 236(uv) 291
317: 17(int) Load 316
318: 173(bool) UGreaterThanEqual 315 317
Store 290(b) 318
319: 14(int16_t) Load 209(i16)
320: 27(int) SConvert 319
321: 27(int) Load 229(i)
322: 173(bool) SLessThanEqual 320 321
Store 290(b) 322
323: 14(int16_t) Load 209(i16)
324: 27(int) SConvert 323
325: 17(int) Bitcast 324
326: 234(ivec3) Load 236(uv)
327: 234(ivec3) CompositeConstruct 325 325 325
328: 234(ivec3) BitwiseOr 326 327
Store 236(uv) 328
329: 14(int16_t) Load 209(i16)
330: 27(int) SConvert 329
331: 27(int) Load 229(i)
332: 27(int) BitwiseOr 330 331
Store 229(i) 332
333: 14(int16_t) Load 209(i16)
334: 71(int64_t) SConvert 333
335: 71(int64_t) Load 252(i64)
336: 71(int64_t) BitwiseAnd 335 334
Store 252(i64) 336
337:202(i16vec3) Load 204(u16v)
338: 234(ivec3) UConvert 337
339: 234(ivec3) Load 236(uv)
340: 234(ivec3) BitwiseAnd 338 339
Store 236(uv) 340
341: 14(int16_t) Load 209(i16)
342: 27(int) SConvert 341
343: 17(int) Bitcast 342
344: 234(ivec3) Load 236(uv)
345: 234(ivec3) CompositeConstruct 343 343 343
346: 234(ivec3) BitwiseXor 344 345
Store 236(uv) 346
347:202(i16vec3) Load 204(u16v)
348: 14(int16_t) Load 209(i16)
349: 36(int16_t) Bitcast 348
350:202(i16vec3) CompositeConstruct 349 349 349
351:202(i16vec3) BitwiseXor 347 350
Store 204(u16v) 351
354: 14(int16_t) Load 209(i16)
355: 352(ptr) AccessChain 196(arr) 354
356: 97(float) Load 355
Store 353(f) 356
Return
FunctionEnd
12(builtinFuncs(): 2 Function None 3
13: Label
343(i16v): 53(ptr) Variable Function
346(i16): 15(ptr) Variable Function
356(u16v): 194(ptr) Variable Function
358(u16): 37(ptr) Variable Function
428(i32): 219(ptr) Variable Function
431(i64): 242(ptr) Variable Function
434(i16v4): 433(ptr) Variable Function
437(u32): 296(ptr) Variable Function
438(u16v2): 58(ptr) Variable Function
442(u64): 441(ptr) Variable Function
445(u16v4): 444(ptr) Variable Function
457(bv): 456(ptr) Variable Function
344: 52(i16vec2) Load 343(i16v)
345: 52(i16vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 344
Store 343(i16v) 345
347: 14(int16_t) Load 346(i16)
348: 14(int16_t) ExtInst 1(GLSL.std.450) 7(SSign) 347
Store 346(i16) 348
349: 52(i16vec2) Load 343(i16v)
350: 14(int16_t) Load 346(i16)
351: 52(i16vec2) CompositeConstruct 350 350
352: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 349 351
Store 343(i16v) 352
353: 52(i16vec2) Load 343(i16v)
355: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 353 354
Store 343(i16v) 355
357:193(i16vec3) Load 356(u16v)
359: 36(int16_t) Load 358(u16)
360:193(i16vec3) CompositeConstruct 359 359 359
361:193(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 357 360
Store 356(u16v) 361
362:193(i16vec3) Load 356(u16v)
364:193(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 362 363
Store 356(u16v) 364
365: 52(i16vec2) Load 343(i16v)
366: 14(int16_t) Load 346(i16)
367: 52(i16vec2) CompositeConstruct 366 366
368: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 365 367
Store 343(i16v) 368
369: 52(i16vec2) Load 343(i16v)
370: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 369 354
Store 343(i16v) 370
371:193(i16vec3) Load 356(u16v)
372: 36(int16_t) Load 358(u16)
373:193(i16vec3) CompositeConstruct 372 372 372
374:193(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 371 373
Store 356(u16v) 374
375:193(i16vec3) Load 356(u16v)
376:193(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 375 363
Store 356(u16v) 376
377: 52(i16vec2) Load 343(i16v)
378: 14(int16_t) Load 346(i16)
379: 14(int16_t) SNegate 378
380: 14(int16_t) Load 346(i16)
381: 52(i16vec2) CompositeConstruct 379 379
382: 52(i16vec2) CompositeConstruct 380 380
383: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 377 381 382
Store 343(i16v) 383
384: 52(i16vec2) Load 343(i16v)
385: 52(i16vec2) Load 343(i16v)
386: 52(i16vec2) SNegate 385
387: 52(i16vec2) Load 343(i16v)
388: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 384 386 387
Store 343(i16v) 388
389:193(i16vec3) Load 356(u16v)
390: 36(int16_t) Load 358(u16)
391: 36(int16_t) SNegate 390
392: 36(int16_t) Load 358(u16)
393:193(i16vec3) CompositeConstruct 391 391 391
394:193(i16vec3) CompositeConstruct 392 392 392
395:193(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 389 393 394
Store 356(u16v) 395
396:193(i16vec3) Load 356(u16v)
397:193(i16vec3) Load 356(u16v)
398:193(i16vec3) SNegate 397
399:193(i16vec3) Load 356(u16v)
400:193(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 396 398 399
Store 356(u16v) 400
401: 15(ptr) AccessChain 343(i16v) 282
402: 14(int16_t) Load 401
403: 15(ptr) AccessChain 343(i16v) 264
404: 14(int16_t) Load 403
406: 14(int16_t) Select 405 404 402
Store 346(i16) 406
407: 14(int16_t) Load 346(i16)
408: 52(i16vec2) CompositeConstruct 407 407
409: 14(int16_t) Load 346(i16)
410: 14(int16_t) SNegate 409
411: 52(i16vec2) CompositeConstruct 410 410
414: 52(i16vec2) Select 413 411 408
Store 343(i16v) 414
415: 37(ptr) AccessChain 356(u16v) 282
416: 36(int16_t) Load 415
417: 37(ptr) AccessChain 356(u16v) 264
418: 36(int16_t) Load 417
419: 36(int16_t) Select 405 418 416
Store 358(u16) 419
420: 36(int16_t) Load 358(u16)
421:193(i16vec3) CompositeConstruct 420 420 420
422: 36(int16_t) Load 358(u16)
423: 36(int16_t) SNegate 422
424:193(i16vec3) CompositeConstruct 423 423 423
427:193(i16vec3) Select 426 424 421
Store 356(u16v) 427
429: 52(i16vec2) Load 343(i16v)
430: 27(int) Bitcast 429
Store 428(i32) 430
435:432(i16vec4) Load 434(i16v4)
436: 71(int64_t) Bitcast 435
Store 431(i64) 436
439: 57(i16vec2) Load 438(u16v2)
440: 17(int) Bitcast 439
Store 437(u32) 440
446:443(i16vec4) Load 445(u16v4)
447: 77(int64_t) Bitcast 446
Store 442(u64) 447
448: 27(int) Load 428(i32)
449: 52(i16vec2) Bitcast 448
Store 343(i16v) 449
450: 71(int64_t) Load 431(i64)
451:432(i16vec4) Bitcast 450
Store 434(i16v4) 451
452: 17(int) Load 437(u32)
453: 57(i16vec2) Bitcast 452
Store 438(u16v2) 453
454: 77(int64_t) Load 442(u64)
455:443(i16vec4) Bitcast 454
Store 445(u16v4) 455
458:193(i16vec3) Load 356(u16v)
459: 36(int16_t) Load 358(u16)
460:193(i16vec3) CompositeConstruct 459 459 459
461: 425(bvec3) ULessThan 458 460
Store 457(bv) 461
462: 52(i16vec2) Load 343(i16v)
463: 14(int16_t) Load 346(i16)
464: 52(i16vec2) CompositeConstruct 463 463
465: 174(bvec2) SLessThan 462 464
466: 280(ptr) AccessChain 457(bv) 282
467: 173(bool) CompositeExtract 465 0
Store 466 467
468: 280(ptr) AccessChain 457(bv) 264
469: 173(bool) CompositeExtract 465 1
Store 468 469
470:193(i16vec3) Load 356(u16v)
471: 36(int16_t) Load 358(u16)
472:193(i16vec3) CompositeConstruct 471 471 471
473: 425(bvec3) ULessThanEqual 470 472
Store 457(bv) 473
474: 52(i16vec2) Load 343(i16v)
475: 14(int16_t) Load 346(i16)
476: 52(i16vec2) CompositeConstruct 475 475
477: 174(bvec2) SLessThanEqual 474 476
478: 280(ptr) AccessChain 457(bv) 282
479: 173(bool) CompositeExtract 477 0
Store 478 479
480: 280(ptr) AccessChain 457(bv) 264
481: 173(bool) CompositeExtract 477 1
357(i16v): 53(ptr) Variable Function
360(i16): 15(ptr) Variable Function
370(u16v): 203(ptr) Variable Function
372(u16): 37(ptr) Variable Function
442(i32): 228(ptr) Variable Function
445(i64): 251(ptr) Variable Function
448(i16v4): 447(ptr) Variable Function
451(u32): 305(ptr) Variable Function
452(u16v2): 58(ptr) Variable Function
456(u64): 455(ptr) Variable Function
459(u16v4): 458(ptr) Variable Function
471(bv): 470(ptr) Variable Function
358: 52(i16vec2) Load 357(i16v)
359: 52(i16vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 358
Store 357(i16v) 359
361: 14(int16_t) Load 360(i16)
362: 14(int16_t) ExtInst 1(GLSL.std.450) 7(SSign) 361
Store 360(i16) 362
363: 52(i16vec2) Load 357(i16v)
364: 14(int16_t) Load 360(i16)
365: 52(i16vec2) CompositeConstruct 364 364
366: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 363 365
Store 357(i16v) 366
367: 52(i16vec2) Load 357(i16v)
369: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 367 368
Store 357(i16v) 369
371:202(i16vec3) Load 370(u16v)
373: 36(int16_t) Load 372(u16)
374:202(i16vec3) CompositeConstruct 373 373 373
375:202(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 371 374
Store 370(u16v) 375
376:202(i16vec3) Load 370(u16v)
378:202(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 376 377
Store 370(u16v) 378
379: 52(i16vec2) Load 357(i16v)
380: 14(int16_t) Load 360(i16)
381: 52(i16vec2) CompositeConstruct 380 380
382: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 379 381
Store 357(i16v) 382
383: 52(i16vec2) Load 357(i16v)
384: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 383 368
Store 357(i16v) 384
385:202(i16vec3) Load 370(u16v)
386: 36(int16_t) Load 372(u16)
387:202(i16vec3) CompositeConstruct 386 386 386
388:202(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 385 387
Store 370(u16v) 388
389:202(i16vec3) Load 370(u16v)
390:202(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 389 377
Store 370(u16v) 390
391: 52(i16vec2) Load 357(i16v)
392: 14(int16_t) Load 360(i16)
393: 14(int16_t) SNegate 392
394: 14(int16_t) Load 360(i16)
395: 52(i16vec2) CompositeConstruct 393 393
396: 52(i16vec2) CompositeConstruct 394 394
397: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 391 395 396
Store 357(i16v) 397
398: 52(i16vec2) Load 357(i16v)
399: 52(i16vec2) Load 357(i16v)
400: 52(i16vec2) SNegate 399
401: 52(i16vec2) Load 357(i16v)
402: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 398 400 401
Store 357(i16v) 402
403:202(i16vec3) Load 370(u16v)
404: 36(int16_t) Load 372(u16)
405: 36(int16_t) SNegate 404
406: 36(int16_t) Load 372(u16)
407:202(i16vec3) CompositeConstruct 405 405 405
408:202(i16vec3) CompositeConstruct 406 406 406
409:202(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 403 407 408
Store 370(u16v) 409
410:202(i16vec3) Load 370(u16v)
411:202(i16vec3) Load 370(u16v)
412:202(i16vec3) SNegate 411
413:202(i16vec3) Load 370(u16v)
414:202(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 410 412 413
Store 370(u16v) 414
415: 15(ptr) AccessChain 357(i16v) 291
416: 14(int16_t) Load 415
417: 15(ptr) AccessChain 357(i16v) 273
418: 14(int16_t) Load 417
420: 14(int16_t) Select 419 418 416
Store 360(i16) 420
421: 14(int16_t) Load 360(i16)
422: 52(i16vec2) CompositeConstruct 421 421
423: 14(int16_t) Load 360(i16)
424: 14(int16_t) SNegate 423
425: 52(i16vec2) CompositeConstruct 424 424
428: 52(i16vec2) Select 427 425 422
Store 357(i16v) 428
429: 37(ptr) AccessChain 370(u16v) 291
430: 36(int16_t) Load 429
431: 37(ptr) AccessChain 370(u16v) 273
432: 36(int16_t) Load 431
433: 36(int16_t) Select 419 432 430
Store 372(u16) 433
434: 36(int16_t) Load 372(u16)
435:202(i16vec3) CompositeConstruct 434 434 434
436: 36(int16_t) Load 372(u16)
437: 36(int16_t) SNegate 436
438:202(i16vec3) CompositeConstruct 437 437 437
441:202(i16vec3) Select 440 438 435
Store 370(u16v) 441
443: 52(i16vec2) Load 357(i16v)
444: 27(int) Bitcast 443
Store 442(i32) 444
449:446(i16vec4) Load 448(i16v4)
450: 71(int64_t) Bitcast 449
Store 445(i64) 450
453: 57(i16vec2) Load 452(u16v2)
454: 17(int) Bitcast 453
Store 451(u32) 454
460:457(i16vec4) Load 459(u16v4)
461: 77(int64_t) Bitcast 460
Store 456(u64) 461
462: 27(int) Load 442(i32)
463: 52(i16vec2) Bitcast 462
Store 357(i16v) 463
464: 71(int64_t) Load 445(i64)
465:446(i16vec4) Bitcast 464
Store 448(i16v4) 465
466: 17(int) Load 451(u32)
467: 57(i16vec2) Bitcast 466
Store 452(u16v2) 467
468: 77(int64_t) Load 456(u64)
469:457(i16vec4) Bitcast 468
Store 459(u16v4) 469
472:202(i16vec3) Load 370(u16v)
473: 36(int16_t) Load 372(u16)
474:202(i16vec3) CompositeConstruct 473 473 473
475: 439(bvec3) ULessThan 472 474
Store 471(bv) 475
476: 52(i16vec2) Load 357(i16v)
477: 14(int16_t) Load 360(i16)
478: 52(i16vec2) CompositeConstruct 477 477
479: 174(bvec2) SLessThan 476 478
480: 289(ptr) AccessChain 471(bv) 291
481: 173(bool) CompositeExtract 479 0
Store 480 481
482:193(i16vec3) Load 356(u16v)
483: 36(int16_t) Load 358(u16)
484:193(i16vec3) CompositeConstruct 483 483 483
485: 425(bvec3) UGreaterThan 482 484
Store 457(bv) 485
486: 52(i16vec2) Load 343(i16v)
487: 14(int16_t) Load 346(i16)
488: 52(i16vec2) CompositeConstruct 487 487
489: 174(bvec2) SGreaterThan 486 488
490: 280(ptr) AccessChain 457(bv) 282
491: 173(bool) CompositeExtract 489 0
Store 490 491
492: 280(ptr) AccessChain 457(bv) 264
493: 173(bool) CompositeExtract 489 1
482: 289(ptr) AccessChain 471(bv) 273
483: 173(bool) CompositeExtract 479 1
Store 482 483
484:202(i16vec3) Load 370(u16v)
485: 36(int16_t) Load 372(u16)
486:202(i16vec3) CompositeConstruct 485 485 485
487: 439(bvec3) ULessThanEqual 484 486
Store 471(bv) 487
488: 52(i16vec2) Load 357(i16v)
489: 14(int16_t) Load 360(i16)
490: 52(i16vec2) CompositeConstruct 489 489
491: 174(bvec2) SLessThanEqual 488 490
492: 289(ptr) AccessChain 471(bv) 291
493: 173(bool) CompositeExtract 491 0
Store 492 493
494:193(i16vec3) Load 356(u16v)
495: 36(int16_t) Load 358(u16)
496:193(i16vec3) CompositeConstruct 495 495 495
497: 425(bvec3) UGreaterThanEqual 494 496
Store 457(bv) 497
498: 52(i16vec2) Load 343(i16v)
499: 14(int16_t) Load 346(i16)
500: 52(i16vec2) CompositeConstruct 499 499
501: 174(bvec2) SGreaterThanEqual 498 500
502: 280(ptr) AccessChain 457(bv) 282
503: 173(bool) CompositeExtract 501 0
Store 502 503
504: 280(ptr) AccessChain 457(bv) 264
505: 173(bool) CompositeExtract 501 1
494: 289(ptr) AccessChain 471(bv) 273
495: 173(bool) CompositeExtract 491 1
Store 494 495
496:202(i16vec3) Load 370(u16v)
497: 36(int16_t) Load 372(u16)
498:202(i16vec3) CompositeConstruct 497 497 497
499: 439(bvec3) UGreaterThan 496 498
Store 471(bv) 499
500: 52(i16vec2) Load 357(i16v)
501: 14(int16_t) Load 360(i16)
502: 52(i16vec2) CompositeConstruct 501 501
503: 174(bvec2) SGreaterThan 500 502
504: 289(ptr) AccessChain 471(bv) 291
505: 173(bool) CompositeExtract 503 0
Store 504 505
506:193(i16vec3) Load 356(u16v)
507: 36(int16_t) Load 358(u16)
508:193(i16vec3) CompositeConstruct 507 507 507
509: 425(bvec3) IEqual 506 508
Store 457(bv) 509
510: 52(i16vec2) Load 343(i16v)
511: 14(int16_t) Load 346(i16)
512: 52(i16vec2) CompositeConstruct 511 511
513: 174(bvec2) IEqual 510 512
514: 280(ptr) AccessChain 457(bv) 282
515: 173(bool) CompositeExtract 513 0
Store 514 515
516: 280(ptr) AccessChain 457(bv) 264
517: 173(bool) CompositeExtract 513 1
506: 289(ptr) AccessChain 471(bv) 273
507: 173(bool) CompositeExtract 503 1
Store 506 507
508:202(i16vec3) Load 370(u16v)
509: 36(int16_t) Load 372(u16)
510:202(i16vec3) CompositeConstruct 509 509 509
511: 439(bvec3) UGreaterThanEqual 508 510
Store 471(bv) 511
512: 52(i16vec2) Load 357(i16v)
513: 14(int16_t) Load 360(i16)
514: 52(i16vec2) CompositeConstruct 513 513
515: 174(bvec2) SGreaterThanEqual 512 514
516: 289(ptr) AccessChain 471(bv) 291
517: 173(bool) CompositeExtract 515 0
Store 516 517
518:193(i16vec3) Load 356(u16v)
519: 36(int16_t) Load 358(u16)
520:193(i16vec3) CompositeConstruct 519 519 519
521: 425(bvec3) INotEqual 518 520
Store 457(bv) 521
522: 52(i16vec2) Load 343(i16v)
523: 14(int16_t) Load 346(i16)
524: 52(i16vec2) CompositeConstruct 523 523
525: 174(bvec2) INotEqual 522 524
526: 280(ptr) AccessChain 457(bv) 282
527: 173(bool) CompositeExtract 525 0
Store 526 527
528: 280(ptr) AccessChain 457(bv) 264
529: 173(bool) CompositeExtract 525 1
518: 289(ptr) AccessChain 471(bv) 273
519: 173(bool) CompositeExtract 515 1
Store 518 519
520:202(i16vec3) Load 370(u16v)
521: 36(int16_t) Load 372(u16)
522:202(i16vec3) CompositeConstruct 521 521 521
523: 439(bvec3) IEqual 520 522
Store 471(bv) 523
524: 52(i16vec2) Load 357(i16v)
525: 14(int16_t) Load 360(i16)
526: 52(i16vec2) CompositeConstruct 525 525
527: 174(bvec2) IEqual 524 526
528: 289(ptr) AccessChain 471(bv) 291
529: 173(bool) CompositeExtract 527 0
Store 528 529
530: 289(ptr) AccessChain 471(bv) 273
531: 173(bool) CompositeExtract 527 1
Store 530 531
532:202(i16vec3) Load 370(u16v)
533: 36(int16_t) Load 372(u16)
534:202(i16vec3) CompositeConstruct 533 533 533
535: 439(bvec3) INotEqual 532 534
Store 471(bv) 535
536: 52(i16vec2) Load 357(i16v)
537: 14(int16_t) Load 360(i16)
538: 52(i16vec2) CompositeConstruct 537 537
539: 174(bvec2) INotEqual 536 538
540: 289(ptr) AccessChain 471(bv) 291
541: 173(bool) CompositeExtract 539 0
Store 540 541
542: 289(ptr) AccessChain 471(bv) 273
543: 173(bool) CompositeExtract 539 1
Store 542 543
Return
FunctionEnd