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
|
|
@ -1,7 +1,7 @@
|
|||
spv.int32.frag
|
||||
// Module Version 10300
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 493
|
||||
// Id's are bound by 505
|
||||
|
||||
Capability Shader
|
||||
Capability Float16
|
||||
|
|
@ -65,41 +65,41 @@ spv.int32.frag
|
|||
Name 416 "u32v2"
|
||||
Name 418 "u64"
|
||||
Name 422 "bv"
|
||||
Name 485 "Block"
|
||||
MemberName 485(Block) 0 "i32"
|
||||
MemberName 485(Block) 1 "i32v2"
|
||||
MemberName 485(Block) 2 "i32v3"
|
||||
MemberName 485(Block) 3 "i32v4"
|
||||
MemberName 485(Block) 4 "u32"
|
||||
MemberName 485(Block) 5 "u32v2"
|
||||
MemberName 485(Block) 6 "u32v3"
|
||||
MemberName 485(Block) 7 "u32v4"
|
||||
Name 487 "block"
|
||||
Name 488 "si32"
|
||||
Name 489 "su32"
|
||||
Name 490 "si"
|
||||
Name 491 "su"
|
||||
Name 492 "sb"
|
||||
Name 497 "Block"
|
||||
MemberName 497(Block) 0 "i32"
|
||||
MemberName 497(Block) 1 "i32v2"
|
||||
MemberName 497(Block) 2 "i32v3"
|
||||
MemberName 497(Block) 3 "i32v4"
|
||||
MemberName 497(Block) 4 "u32"
|
||||
MemberName 497(Block) 5 "u32v2"
|
||||
MemberName 497(Block) 6 "u32v3"
|
||||
MemberName 497(Block) 7 "u32v4"
|
||||
Name 499 "block"
|
||||
Name 500 "si32"
|
||||
Name 501 "su32"
|
||||
Name 502 "si"
|
||||
Name 503 "su"
|
||||
Name 504 "sb"
|
||||
MemberDecorate 27(Uniforms) 0 Offset 0
|
||||
Decorate 27(Uniforms) Block
|
||||
Decorate 29 DescriptorSet 0
|
||||
Decorate 29 Binding 0
|
||||
MemberDecorate 485(Block) 0 Offset 0
|
||||
MemberDecorate 485(Block) 1 Offset 8
|
||||
MemberDecorate 485(Block) 2 Offset 16
|
||||
MemberDecorate 485(Block) 3 Offset 32
|
||||
MemberDecorate 485(Block) 4 Offset 48
|
||||
MemberDecorate 485(Block) 5 Offset 56
|
||||
MemberDecorate 485(Block) 6 Offset 64
|
||||
MemberDecorate 485(Block) 7 Offset 80
|
||||
Decorate 485(Block) Block
|
||||
Decorate 487(block) DescriptorSet 0
|
||||
Decorate 487(block) Binding 1
|
||||
Decorate 488(si32) SpecId 100
|
||||
Decorate 489(su32) SpecId 101
|
||||
Decorate 490(si) SpecId 102
|
||||
Decorate 491(su) SpecId 103
|
||||
Decorate 492(sb) SpecId 104
|
||||
MemberDecorate 497(Block) 0 Offset 0
|
||||
MemberDecorate 497(Block) 1 Offset 8
|
||||
MemberDecorate 497(Block) 2 Offset 16
|
||||
MemberDecorate 497(Block) 3 Offset 32
|
||||
MemberDecorate 497(Block) 4 Offset 48
|
||||
MemberDecorate 497(Block) 5 Offset 56
|
||||
MemberDecorate 497(Block) 6 Offset 64
|
||||
MemberDecorate 497(Block) 7 Offset 80
|
||||
Decorate 497(Block) Block
|
||||
Decorate 499(block) DescriptorSet 0
|
||||
Decorate 499(block) Binding 1
|
||||
Decorate 500(si32) SpecId 100
|
||||
Decorate 501(su32) SpecId 101
|
||||
Decorate 502(si) SpecId 102
|
||||
Decorate 503(su) SpecId 103
|
||||
Decorate 504(sb) SpecId 104
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
14: TypeInt 32 0
|
||||
|
|
@ -185,16 +185,16 @@ spv.int32.frag
|
|||
406: TypePointer Function 405(i8vec4)
|
||||
417: TypePointer Function 63(int64_t)
|
||||
421: TypePointer Function 394(bvec3)
|
||||
483: TypeVector 18(int) 4
|
||||
484: TypeVector 14(int) 4
|
||||
485(Block): TypeStruct 18(int) 52(ivec2) 188(ivec3) 483(ivec4) 14(int) 49(ivec2) 184(ivec3) 484(ivec4)
|
||||
486: TypePointer Uniform 485(Block)
|
||||
487(block): 486(ptr) Variable Uniform
|
||||
488(si32): 18(int) SpecConstant 4294967286
|
||||
489(su32): 14(int) SpecConstant 20
|
||||
490(si): 18(int) SpecConstant 4294967291
|
||||
491(su): 14(int) SpecConstant 4
|
||||
492(sb): 165(bool) SpecConstantTrue
|
||||
495: TypeVector 18(int) 4
|
||||
496: TypeVector 14(int) 4
|
||||
497(Block): TypeStruct 18(int) 52(ivec2) 188(ivec3) 495(ivec4) 14(int) 49(ivec2) 184(ivec3) 496(ivec4)
|
||||
498: TypePointer Uniform 497(Block)
|
||||
499(block): 498(ptr) Variable Uniform
|
||||
500(si32): 18(int) SpecConstant 4294967286
|
||||
501(su32): 14(int) SpecConstant 20
|
||||
502(si): 18(int) SpecConstant 4294967291
|
||||
503(su): 14(int) SpecConstant 4
|
||||
504(sb): 165(bool) SpecConstantTrue
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 16(u32Max) 17
|
||||
|
|
@ -645,68 +645,86 @@ spv.int32.frag
|
|||
428: 18(int) Load 315(i32)
|
||||
429: 52(ivec2) CompositeConstruct 428 428
|
||||
430: 166(bvec2) SLessThan 427 429
|
||||
431: 394(bvec3) Load 422(bv)
|
||||
432: 394(bvec3) VectorShuffle 431 430 3 4 2
|
||||
Store 422(bv) 432
|
||||
433: 184(ivec3) Load 325(u32v)
|
||||
434: 14(int) Load 327(u32)
|
||||
435: 184(ivec3) CompositeConstruct 434 434 434
|
||||
436: 394(bvec3) ULessThanEqual 433 435
|
||||
Store 422(bv) 436
|
||||
437: 52(ivec2) Load 312(i32v)
|
||||
438: 18(int) Load 315(i32)
|
||||
439: 52(ivec2) CompositeConstruct 438 438
|
||||
440: 166(bvec2) SLessThanEqual 437 439
|
||||
441: 394(bvec3) Load 422(bv)
|
||||
442: 394(bvec3) VectorShuffle 441 440 3 4 2
|
||||
Store 422(bv) 442
|
||||
443: 184(ivec3) Load 325(u32v)
|
||||
444: 14(int) Load 327(u32)
|
||||
445: 184(ivec3) CompositeConstruct 444 444 444
|
||||
446: 394(bvec3) UGreaterThan 443 445
|
||||
Store 422(bv) 446
|
||||
447: 52(ivec2) Load 312(i32v)
|
||||
448: 18(int) Load 315(i32)
|
||||
449: 52(ivec2) CompositeConstruct 448 448
|
||||
450: 166(bvec2) SGreaterThan 447 449
|
||||
451: 394(bvec3) Load 422(bv)
|
||||
452: 394(bvec3) VectorShuffle 451 450 3 4 2
|
||||
Store 422(bv) 452
|
||||
453: 184(ivec3) Load 325(u32v)
|
||||
454: 14(int) Load 327(u32)
|
||||
455: 184(ivec3) CompositeConstruct 454 454 454
|
||||
456: 394(bvec3) UGreaterThanEqual 453 455
|
||||
Store 422(bv) 456
|
||||
457: 52(ivec2) Load 312(i32v)
|
||||
458: 18(int) Load 315(i32)
|
||||
459: 52(ivec2) CompositeConstruct 458 458
|
||||
460: 166(bvec2) SGreaterThanEqual 457 459
|
||||
461: 394(bvec3) Load 422(bv)
|
||||
462: 394(bvec3) VectorShuffle 461 460 3 4 2
|
||||
431: 259(ptr) AccessChain 422(bv) 175
|
||||
432: 165(bool) CompositeExtract 430 0
|
||||
Store 431 432
|
||||
433: 259(ptr) AccessChain 422(bv) 176
|
||||
434: 165(bool) CompositeExtract 430 1
|
||||
Store 433 434
|
||||
435: 184(ivec3) Load 325(u32v)
|
||||
436: 14(int) Load 327(u32)
|
||||
437: 184(ivec3) CompositeConstruct 436 436 436
|
||||
438: 394(bvec3) ULessThanEqual 435 437
|
||||
Store 422(bv) 438
|
||||
439: 52(ivec2) Load 312(i32v)
|
||||
440: 18(int) Load 315(i32)
|
||||
441: 52(ivec2) CompositeConstruct 440 440
|
||||
442: 166(bvec2) SLessThanEqual 439 441
|
||||
443: 259(ptr) AccessChain 422(bv) 175
|
||||
444: 165(bool) CompositeExtract 442 0
|
||||
Store 443 444
|
||||
445: 259(ptr) AccessChain 422(bv) 176
|
||||
446: 165(bool) CompositeExtract 442 1
|
||||
Store 445 446
|
||||
447: 184(ivec3) Load 325(u32v)
|
||||
448: 14(int) Load 327(u32)
|
||||
449: 184(ivec3) CompositeConstruct 448 448 448
|
||||
450: 394(bvec3) UGreaterThan 447 449
|
||||
Store 422(bv) 450
|
||||
451: 52(ivec2) Load 312(i32v)
|
||||
452: 18(int) Load 315(i32)
|
||||
453: 52(ivec2) CompositeConstruct 452 452
|
||||
454: 166(bvec2) SGreaterThan 451 453
|
||||
455: 259(ptr) AccessChain 422(bv) 175
|
||||
456: 165(bool) CompositeExtract 454 0
|
||||
Store 455 456
|
||||
457: 259(ptr) AccessChain 422(bv) 176
|
||||
458: 165(bool) CompositeExtract 454 1
|
||||
Store 457 458
|
||||
459: 184(ivec3) Load 325(u32v)
|
||||
460: 14(int) Load 327(u32)
|
||||
461: 184(ivec3) CompositeConstruct 460 460 460
|
||||
462: 394(bvec3) UGreaterThanEqual 459 461
|
||||
Store 422(bv) 462
|
||||
463: 184(ivec3) Load 325(u32v)
|
||||
464: 14(int) Load 327(u32)
|
||||
465: 184(ivec3) CompositeConstruct 464 464 464
|
||||
466: 394(bvec3) IEqual 463 465
|
||||
Store 422(bv) 466
|
||||
467: 52(ivec2) Load 312(i32v)
|
||||
468: 18(int) Load 315(i32)
|
||||
469: 52(ivec2) CompositeConstruct 468 468
|
||||
470: 166(bvec2) IEqual 467 469
|
||||
471: 394(bvec3) Load 422(bv)
|
||||
472: 394(bvec3) VectorShuffle 471 470 3 4 2
|
||||
Store 422(bv) 472
|
||||
473: 184(ivec3) Load 325(u32v)
|
||||
474: 14(int) Load 327(u32)
|
||||
475: 184(ivec3) CompositeConstruct 474 474 474
|
||||
476: 394(bvec3) INotEqual 473 475
|
||||
Store 422(bv) 476
|
||||
477: 52(ivec2) Load 312(i32v)
|
||||
478: 18(int) Load 315(i32)
|
||||
479: 52(ivec2) CompositeConstruct 478 478
|
||||
480: 166(bvec2) INotEqual 477 479
|
||||
481: 394(bvec3) Load 422(bv)
|
||||
482: 394(bvec3) VectorShuffle 481 480 3 4 2
|
||||
Store 422(bv) 482
|
||||
463: 52(ivec2) Load 312(i32v)
|
||||
464: 18(int) Load 315(i32)
|
||||
465: 52(ivec2) CompositeConstruct 464 464
|
||||
466: 166(bvec2) SGreaterThanEqual 463 465
|
||||
467: 259(ptr) AccessChain 422(bv) 175
|
||||
468: 165(bool) CompositeExtract 466 0
|
||||
Store 467 468
|
||||
469: 259(ptr) AccessChain 422(bv) 176
|
||||
470: 165(bool) CompositeExtract 466 1
|
||||
Store 469 470
|
||||
471: 184(ivec3) Load 325(u32v)
|
||||
472: 14(int) Load 327(u32)
|
||||
473: 184(ivec3) CompositeConstruct 472 472 472
|
||||
474: 394(bvec3) IEqual 471 473
|
||||
Store 422(bv) 474
|
||||
475: 52(ivec2) Load 312(i32v)
|
||||
476: 18(int) Load 315(i32)
|
||||
477: 52(ivec2) CompositeConstruct 476 476
|
||||
478: 166(bvec2) IEqual 475 477
|
||||
479: 259(ptr) AccessChain 422(bv) 175
|
||||
480: 165(bool) CompositeExtract 478 0
|
||||
Store 479 480
|
||||
481: 259(ptr) AccessChain 422(bv) 176
|
||||
482: 165(bool) CompositeExtract 478 1
|
||||
Store 481 482
|
||||
483: 184(ivec3) Load 325(u32v)
|
||||
484: 14(int) Load 327(u32)
|
||||
485: 184(ivec3) CompositeConstruct 484 484 484
|
||||
486: 394(bvec3) INotEqual 483 485
|
||||
Store 422(bv) 486
|
||||
487: 52(ivec2) Load 312(i32v)
|
||||
488: 18(int) Load 315(i32)
|
||||
489: 52(ivec2) CompositeConstruct 488 488
|
||||
490: 166(bvec2) INotEqual 487 489
|
||||
491: 259(ptr) AccessChain 422(bv) 175
|
||||
492: 165(bool) CompositeExtract 490 0
|
||||
Store 491 492
|
||||
493: 259(ptr) AccessChain 422(bv) 176
|
||||
494: 165(bool) CompositeExtract 490 1
|
||||
Store 493 494
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue