Generate separate stores for partially swizzled memory stores
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.
This commit is contained in:
parent
9158061398
commit
6d5b40f051
50 changed files with 31343 additions and 26594 deletions
|
|
@ -2,7 +2,7 @@ spv.int64.frag
|
|||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 499
|
||||
// Id's are bound by 513
|
||||
|
||||
Capability Shader
|
||||
Capability Float64
|
||||
|
|
@ -44,48 +44,48 @@ Validation failed
|
|||
Name 299 "u64v"
|
||||
Name 301 "u64"
|
||||
Name 373 "dv"
|
||||
Name 392 "iv"
|
||||
Name 397 "uv"
|
||||
Name 401 "bv"
|
||||
Name 472 "Block"
|
||||
MemberName 472(Block) 0 "i64v"
|
||||
MemberName 472(Block) 1 "u64"
|
||||
Name 474 "block"
|
||||
Name 475 "si64"
|
||||
Name 476 "su64"
|
||||
Name 477 "si"
|
||||
Name 478 "su"
|
||||
Name 479 "sb"
|
||||
Name 480 "su64inc"
|
||||
Name 481 "i64_to_b"
|
||||
Name 482 "u64_to_b"
|
||||
Name 483 "b_to_i64"
|
||||
Name 484 "b_to_u64"
|
||||
Name 485 "i64_to_i"
|
||||
Name 486 "i_to_i64"
|
||||
Name 487 "u64_to_u"
|
||||
Name 488 "u_to_u64"
|
||||
Name 489 "u64_to_i64"
|
||||
Name 490 "i64_to_u64"
|
||||
Name 492 "u64_to_i"
|
||||
Name 494 "i_to_u64"
|
||||
Name 496 "i64_to_u"
|
||||
Name 498 "u_to_i64"
|
||||
Name 394 "iv"
|
||||
Name 399 "uv"
|
||||
Name 403 "bv"
|
||||
Name 486 "Block"
|
||||
MemberName 486(Block) 0 "i64v"
|
||||
MemberName 486(Block) 1 "u64"
|
||||
Name 488 "block"
|
||||
Name 489 "si64"
|
||||
Name 490 "su64"
|
||||
Name 491 "si"
|
||||
Name 492 "su"
|
||||
Name 493 "sb"
|
||||
Name 494 "su64inc"
|
||||
Name 495 "i64_to_b"
|
||||
Name 496 "u64_to_b"
|
||||
Name 497 "b_to_i64"
|
||||
Name 498 "b_to_u64"
|
||||
Name 499 "i64_to_i"
|
||||
Name 500 "i_to_i64"
|
||||
Name 501 "u64_to_u"
|
||||
Name 502 "u_to_u64"
|
||||
Name 503 "u64_to_i64"
|
||||
Name 504 "i64_to_u64"
|
||||
Name 506 "u64_to_i"
|
||||
Name 508 "i_to_u64"
|
||||
Name 510 "i64_to_u"
|
||||
Name 512 "u_to_i64"
|
||||
MemberDecorate 28(Uniforms) 0 Offset 0
|
||||
Decorate 28(Uniforms) Block
|
||||
Decorate 30 DescriptorSet 0
|
||||
Decorate 30 Binding 0
|
||||
MemberDecorate 472(Block) 0 Offset 0
|
||||
MemberDecorate 472(Block) 1 Offset 24
|
||||
Decorate 472(Block) Block
|
||||
Decorate 474(block) DescriptorSet 0
|
||||
Decorate 474(block) Binding 1
|
||||
Decorate 475(si64) SpecId 100
|
||||
Decorate 476(su64) SpecId 101
|
||||
Decorate 477(si) SpecId 102
|
||||
Decorate 478(su) SpecId 103
|
||||
Decorate 479(sb) SpecId 104
|
||||
Decorate 480(su64inc) SpecId 105
|
||||
MemberDecorate 486(Block) 0 Offset 0
|
||||
MemberDecorate 486(Block) 1 Offset 24
|
||||
Decorate 486(Block) Block
|
||||
Decorate 488(block) DescriptorSet 0
|
||||
Decorate 488(block) Binding 1
|
||||
Decorate 489(si64) SpecId 100
|
||||
Decorate 490(su64) SpecId 101
|
||||
Decorate 491(si) SpecId 102
|
||||
Decorate 492(su) SpecId 103
|
||||
Decorate 493(sb) SpecId 104
|
||||
Decorate 494(su64inc) SpecId 105
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
14: TypeInt 64 0
|
||||
|
|
@ -161,38 +161,38 @@ Validation failed
|
|||
371: TypeVector 94(float64_t) 3
|
||||
372: TypePointer Function 371(f64vec3)
|
||||
377: TypePointer Function 94(float64_t)
|
||||
388: 31(int) Constant 1
|
||||
389: 31(int) Constant 2
|
||||
390: 74(ivec2) ConstantComposite 388 389
|
||||
395: 81(ivec2) ConstantComposite 217 22
|
||||
400: TypePointer Function 368(bvec3)
|
||||
472(Block): TypeStruct 136(i64vec3) 14(int64_t)
|
||||
473: TypePointer Uniform 472(Block)
|
||||
474(block): 473(ptr) Variable Uniform
|
||||
475(si64): 18(int64_t) SpecConstant 4294967286 4294967295
|
||||
476(su64): 14(int64_t) SpecConstant 20 0
|
||||
477(si): 31(int) SpecConstant 4294967291
|
||||
478(su): 21(int) SpecConstant 4
|
||||
479(sb): 55(bool) SpecConstantTrue
|
||||
480(su64inc): 14(int64_t) SpecConstantOp 128 476(su64) 70
|
||||
481(i64_to_b): 55(bool) SpecConstantOp 171 475(si64) 69
|
||||
482(u64_to_b): 55(bool) SpecConstantOp 171 476(su64) 69
|
||||
483(b_to_i64): 18(int64_t) SpecConstantOp 169 479(sb) 61 60
|
||||
484(b_to_u64): 14(int64_t) SpecConstantOp 169 479(sb) 70 69
|
||||
485(i64_to_i): 31(int) SpecConstantOp 114 475(si64)
|
||||
486(i_to_i64): 18(int64_t) SpecConstantOp 114 477(si)
|
||||
487(u64_to_u): 21(int) SpecConstantOp 113 476(su64)
|
||||
488(u_to_u64): 14(int64_t) SpecConstantOp 113 478(su)
|
||||
489(u64_to_i64): 18(int64_t) SpecConstantOp 128 476(su64) 69
|
||||
490(i64_to_u64): 14(int64_t) SpecConstantOp 128 475(si64) 69
|
||||
491: 21(int) SpecConstantOp 113 476(su64)
|
||||
492(u64_to_i): 31(int) SpecConstantOp 128 491 227
|
||||
493: 18(int64_t) SpecConstantOp 114 477(si)
|
||||
494(i_to_u64): 14(int64_t) SpecConstantOp 128 493 69
|
||||
495: 31(int) SpecConstantOp 114 475(si64)
|
||||
496(i64_to_u): 21(int) SpecConstantOp 128 495 227
|
||||
497: 14(int64_t) SpecConstantOp 113 478(su)
|
||||
498(u_to_i64): 18(int64_t) SpecConstantOp 128 497 69
|
||||
390: 31(int) Constant 1
|
||||
391: 31(int) Constant 2
|
||||
392: 74(ivec2) ConstantComposite 390 391
|
||||
397: 81(ivec2) ConstantComposite 217 22
|
||||
402: TypePointer Function 368(bvec3)
|
||||
486(Block): TypeStruct 136(i64vec3) 14(int64_t)
|
||||
487: TypePointer Uniform 486(Block)
|
||||
488(block): 487(ptr) Variable Uniform
|
||||
489(si64): 18(int64_t) SpecConstant 4294967286 4294967295
|
||||
490(su64): 14(int64_t) SpecConstant 20 0
|
||||
491(si): 31(int) SpecConstant 4294967291
|
||||
492(su): 21(int) SpecConstant 4
|
||||
493(sb): 55(bool) SpecConstantTrue
|
||||
494(su64inc): 14(int64_t) SpecConstantOp 128 490(su64) 70
|
||||
495(i64_to_b): 55(bool) SpecConstantOp 171 489(si64) 69
|
||||
496(u64_to_b): 55(bool) SpecConstantOp 171 490(su64) 69
|
||||
497(b_to_i64): 18(int64_t) SpecConstantOp 169 493(sb) 61 60
|
||||
498(b_to_u64): 14(int64_t) SpecConstantOp 169 493(sb) 70 69
|
||||
499(i64_to_i): 31(int) SpecConstantOp 114 489(si64)
|
||||
500(i_to_i64): 18(int64_t) SpecConstantOp 114 491(si)
|
||||
501(u64_to_u): 21(int) SpecConstantOp 113 490(su64)
|
||||
502(u_to_u64): 14(int64_t) SpecConstantOp 113 492(su)
|
||||
503(u64_to_i64): 18(int64_t) SpecConstantOp 128 490(su64) 69
|
||||
504(i64_to_u64): 14(int64_t) SpecConstantOp 128 489(si64) 69
|
||||
505: 21(int) SpecConstantOp 113 490(su64)
|
||||
506(u64_to_i): 31(int) SpecConstantOp 128 505 227
|
||||
507: 18(int64_t) SpecConstantOp 114 491(si)
|
||||
508(i_to_u64): 14(int64_t) SpecConstantOp 128 507 69
|
||||
509: 31(int) SpecConstantOp 114 489(si64)
|
||||
510(i64_to_u): 21(int) SpecConstantOp 128 509 227
|
||||
511: 14(int64_t) SpecConstantOp 113 492(su)
|
||||
512(u_to_i64): 18(int64_t) SpecConstantOp 128 511 69
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 16(u64Max) 17
|
||||
|
|
@ -487,9 +487,9 @@ Validation failed
|
|||
299(u64v): 133(ptr) Variable Function
|
||||
301(u64): 40(ptr) Variable Function
|
||||
373(dv): 372(ptr) Variable Function
|
||||
392(iv): 75(ptr) Variable Function
|
||||
397(uv): 82(ptr) Variable Function
|
||||
401(bv): 400(ptr) Variable Function
|
||||
394(iv): 75(ptr) Variable Function
|
||||
399(uv): 82(ptr) Variable Function
|
||||
403(bv): 402(ptr) Variable Function
|
||||
287: 52(i64vec2) Load 286(i64v)
|
||||
288: 52(i64vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 287
|
||||
Store 286(i64v) 288
|
||||
|
|
@ -593,107 +593,128 @@ Validation failed
|
|||
Store 381 380
|
||||
382: 52(i64vec2) Load 286(i64v)
|
||||
383: 95(f64vec2) Bitcast 382
|
||||
384:371(f64vec3) Load 373(dv)
|
||||
385:371(f64vec3) VectorShuffle 384 383 3 4 2
|
||||
Store 373(dv) 385
|
||||
386:132(i64vec3) Load 299(u64v)
|
||||
387:371(f64vec3) Bitcast 386
|
||||
Store 373(dv) 387
|
||||
391: 18(int64_t) Bitcast 390
|
||||
Store 289(i64) 391
|
||||
393: 18(int64_t) Load 289(i64)
|
||||
394: 74(ivec2) Bitcast 393
|
||||
Store 392(iv) 394
|
||||
396: 14(int64_t) Bitcast 395
|
||||
Store 301(u64) 396
|
||||
398: 14(int64_t) Load 301(u64)
|
||||
399: 81(ivec2) Bitcast 398
|
||||
Store 397(uv) 399
|
||||
402:132(i64vec3) Load 299(u64v)
|
||||
403: 14(int64_t) Load 301(u64)
|
||||
404:132(i64vec3) CompositeConstruct 403 403 403
|
||||
405: 368(bvec3) ULessThan 402 404
|
||||
Store 401(bv) 405
|
||||
406: 52(i64vec2) Load 286(i64v)
|
||||
407: 18(int64_t) Load 289(i64)
|
||||
408: 52(i64vec2) CompositeConstruct 407 407
|
||||
409: 56(bvec2) SLessThan 406 408
|
||||
410: 368(bvec3) Load 401(bv)
|
||||
411: 368(bvec3) VectorShuffle 410 409 3 4 2
|
||||
Store 401(bv) 411
|
||||
412:132(i64vec3) Load 299(u64v)
|
||||
413: 14(int64_t) Load 301(u64)
|
||||
414:132(i64vec3) CompositeConstruct 413 413 413
|
||||
415: 368(bvec3) ULessThanEqual 412 414
|
||||
Store 401(bv) 415
|
||||
416: 52(i64vec2) Load 286(i64v)
|
||||
417: 18(int64_t) Load 289(i64)
|
||||
418: 52(i64vec2) CompositeConstruct 417 417
|
||||
419: 56(bvec2) SLessThanEqual 416 418
|
||||
420: 368(bvec3) Load 401(bv)
|
||||
421: 368(bvec3) VectorShuffle 420 419 3 4 2
|
||||
Store 401(bv) 421
|
||||
422:132(i64vec3) Load 299(u64v)
|
||||
423: 14(int64_t) Load 301(u64)
|
||||
424:132(i64vec3) CompositeConstruct 423 423 423
|
||||
425: 368(bvec3) UGreaterThan 422 424
|
||||
Store 401(bv) 425
|
||||
426: 52(i64vec2) Load 286(i64v)
|
||||
427: 18(int64_t) Load 289(i64)
|
||||
428: 52(i64vec2) CompositeConstruct 427 427
|
||||
429: 56(bvec2) SGreaterThan 426 428
|
||||
430: 368(bvec3) Load 401(bv)
|
||||
431: 368(bvec3) VectorShuffle 430 429 3 4 2
|
||||
Store 401(bv) 431
|
||||
432:132(i64vec3) Load 299(u64v)
|
||||
433: 14(int64_t) Load 301(u64)
|
||||
434:132(i64vec3) CompositeConstruct 433 433 433
|
||||
435: 368(bvec3) UGreaterThanEqual 432 434
|
||||
Store 401(bv) 435
|
||||
436: 52(i64vec2) Load 286(i64v)
|
||||
437: 18(int64_t) Load 289(i64)
|
||||
438: 52(i64vec2) CompositeConstruct 437 437
|
||||
439: 56(bvec2) SGreaterThanEqual 436 438
|
||||
440: 368(bvec3) Load 401(bv)
|
||||
441: 368(bvec3) VectorShuffle 440 439 3 4 2
|
||||
Store 401(bv) 441
|
||||
442:132(i64vec3) Load 299(u64v)
|
||||
443: 14(int64_t) Load 301(u64)
|
||||
444:132(i64vec3) CompositeConstruct 443 443 443
|
||||
445: 368(bvec3) IEqual 442 444
|
||||
Store 401(bv) 445
|
||||
446: 52(i64vec2) Load 286(i64v)
|
||||
447: 18(int64_t) Load 289(i64)
|
||||
448: 52(i64vec2) CompositeConstruct 447 447
|
||||
449: 56(bvec2) IEqual 446 448
|
||||
450: 368(bvec3) Load 401(bv)
|
||||
451: 368(bvec3) VectorShuffle 450 449 3 4 2
|
||||
Store 401(bv) 451
|
||||
384: 377(ptr) AccessChain 373(dv) 227
|
||||
385:94(float64_t) CompositeExtract 383 0
|
||||
Store 384 385
|
||||
386: 377(ptr) AccessChain 373(dv) 203
|
||||
387:94(float64_t) CompositeExtract 383 1
|
||||
Store 386 387
|
||||
388:132(i64vec3) Load 299(u64v)
|
||||
389:371(f64vec3) Bitcast 388
|
||||
Store 373(dv) 389
|
||||
393: 18(int64_t) Bitcast 392
|
||||
Store 289(i64) 393
|
||||
395: 18(int64_t) Load 289(i64)
|
||||
396: 74(ivec2) Bitcast 395
|
||||
Store 394(iv) 396
|
||||
398: 14(int64_t) Bitcast 397
|
||||
Store 301(u64) 398
|
||||
400: 14(int64_t) Load 301(u64)
|
||||
401: 81(ivec2) Bitcast 400
|
||||
Store 399(uv) 401
|
||||
404:132(i64vec3) Load 299(u64v)
|
||||
405: 14(int64_t) Load 301(u64)
|
||||
406:132(i64vec3) CompositeConstruct 405 405 405
|
||||
407: 368(bvec3) ULessThan 404 406
|
||||
Store 403(bv) 407
|
||||
408: 52(i64vec2) Load 286(i64v)
|
||||
409: 18(int64_t) Load 289(i64)
|
||||
410: 52(i64vec2) CompositeConstruct 409 409
|
||||
411: 56(bvec2) SLessThan 408 410
|
||||
412: 225(ptr) AccessChain 403(bv) 227
|
||||
413: 55(bool) CompositeExtract 411 0
|
||||
Store 412 413
|
||||
414: 225(ptr) AccessChain 403(bv) 203
|
||||
415: 55(bool) CompositeExtract 411 1
|
||||
Store 414 415
|
||||
416:132(i64vec3) Load 299(u64v)
|
||||
417: 14(int64_t) Load 301(u64)
|
||||
418:132(i64vec3) CompositeConstruct 417 417 417
|
||||
419: 368(bvec3) ULessThanEqual 416 418
|
||||
Store 403(bv) 419
|
||||
420: 52(i64vec2) Load 286(i64v)
|
||||
421: 18(int64_t) Load 289(i64)
|
||||
422: 52(i64vec2) CompositeConstruct 421 421
|
||||
423: 56(bvec2) SLessThanEqual 420 422
|
||||
424: 225(ptr) AccessChain 403(bv) 227
|
||||
425: 55(bool) CompositeExtract 423 0
|
||||
Store 424 425
|
||||
426: 225(ptr) AccessChain 403(bv) 203
|
||||
427: 55(bool) CompositeExtract 423 1
|
||||
Store 426 427
|
||||
428:132(i64vec3) Load 299(u64v)
|
||||
429: 14(int64_t) Load 301(u64)
|
||||
430:132(i64vec3) CompositeConstruct 429 429 429
|
||||
431: 368(bvec3) UGreaterThan 428 430
|
||||
Store 403(bv) 431
|
||||
432: 52(i64vec2) Load 286(i64v)
|
||||
433: 18(int64_t) Load 289(i64)
|
||||
434: 52(i64vec2) CompositeConstruct 433 433
|
||||
435: 56(bvec2) SGreaterThan 432 434
|
||||
436: 225(ptr) AccessChain 403(bv) 227
|
||||
437: 55(bool) CompositeExtract 435 0
|
||||
Store 436 437
|
||||
438: 225(ptr) AccessChain 403(bv) 203
|
||||
439: 55(bool) CompositeExtract 435 1
|
||||
Store 438 439
|
||||
440:132(i64vec3) Load 299(u64v)
|
||||
441: 14(int64_t) Load 301(u64)
|
||||
442:132(i64vec3) CompositeConstruct 441 441 441
|
||||
443: 368(bvec3) UGreaterThanEqual 440 442
|
||||
Store 403(bv) 443
|
||||
444: 52(i64vec2) Load 286(i64v)
|
||||
445: 18(int64_t) Load 289(i64)
|
||||
446: 52(i64vec2) CompositeConstruct 445 445
|
||||
447: 56(bvec2) SGreaterThanEqual 444 446
|
||||
448: 225(ptr) AccessChain 403(bv) 227
|
||||
449: 55(bool) CompositeExtract 447 0
|
||||
Store 448 449
|
||||
450: 225(ptr) AccessChain 403(bv) 203
|
||||
451: 55(bool) CompositeExtract 447 1
|
||||
Store 450 451
|
||||
452:132(i64vec3) Load 299(u64v)
|
||||
453: 14(int64_t) Load 301(u64)
|
||||
454:132(i64vec3) CompositeConstruct 453 453 453
|
||||
455: 368(bvec3) INotEqual 452 454
|
||||
Store 401(bv) 455
|
||||
455: 368(bvec3) IEqual 452 454
|
||||
Store 403(bv) 455
|
||||
456: 52(i64vec2) Load 286(i64v)
|
||||
457: 18(int64_t) Load 289(i64)
|
||||
458: 52(i64vec2) CompositeConstruct 457 457
|
||||
459: 56(bvec2) INotEqual 456 458
|
||||
460: 368(bvec3) Load 401(bv)
|
||||
461: 368(bvec3) VectorShuffle 460 459 3 4 2
|
||||
Store 401(bv) 461
|
||||
462: 14(int64_t) Load 301(u64)
|
||||
463: 18(int64_t) ExtInst 1(GLSL.std.450) 73(FindILsb) 462
|
||||
Store 289(i64) 463
|
||||
464: 14(int64_t) Load 301(u64)
|
||||
465: 65(i64vec2) CompositeConstruct 464 464
|
||||
466: 52(i64vec2) ExtInst 1(GLSL.std.450) 73(FindILsb) 465
|
||||
Store 286(i64v) 466
|
||||
467: 14(int64_t) Load 301(u64)
|
||||
468: 18(int64_t) BitCount 467
|
||||
Store 289(i64) 468
|
||||
469: 14(int64_t) Load 301(u64)
|
||||
470: 65(i64vec2) CompositeConstruct 469 469
|
||||
471: 52(i64vec2) BitCount 470
|
||||
Store 286(i64v) 471
|
||||
459: 56(bvec2) IEqual 456 458
|
||||
460: 225(ptr) AccessChain 403(bv) 227
|
||||
461: 55(bool) CompositeExtract 459 0
|
||||
Store 460 461
|
||||
462: 225(ptr) AccessChain 403(bv) 203
|
||||
463: 55(bool) CompositeExtract 459 1
|
||||
Store 462 463
|
||||
464:132(i64vec3) Load 299(u64v)
|
||||
465: 14(int64_t) Load 301(u64)
|
||||
466:132(i64vec3) CompositeConstruct 465 465 465
|
||||
467: 368(bvec3) INotEqual 464 466
|
||||
Store 403(bv) 467
|
||||
468: 52(i64vec2) Load 286(i64v)
|
||||
469: 18(int64_t) Load 289(i64)
|
||||
470: 52(i64vec2) CompositeConstruct 469 469
|
||||
471: 56(bvec2) INotEqual 468 470
|
||||
472: 225(ptr) AccessChain 403(bv) 227
|
||||
473: 55(bool) CompositeExtract 471 0
|
||||
Store 472 473
|
||||
474: 225(ptr) AccessChain 403(bv) 203
|
||||
475: 55(bool) CompositeExtract 471 1
|
||||
Store 474 475
|
||||
476: 14(int64_t) Load 301(u64)
|
||||
477: 18(int64_t) ExtInst 1(GLSL.std.450) 73(FindILsb) 476
|
||||
Store 289(i64) 477
|
||||
478: 14(int64_t) Load 301(u64)
|
||||
479: 65(i64vec2) CompositeConstruct 478 478
|
||||
480: 52(i64vec2) ExtInst 1(GLSL.std.450) 73(FindILsb) 479
|
||||
Store 286(i64v) 480
|
||||
481: 14(int64_t) Load 301(u64)
|
||||
482: 18(int64_t) BitCount 481
|
||||
Store 289(i64) 482
|
||||
483: 14(int64_t) Load 301(u64)
|
||||
484: 65(i64vec2) CompositeConstruct 483 483
|
||||
485: 52(i64vec2) BitCount 484
|
||||
Store 286(i64v) 485
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue