glslang/Test/baseResults/remap.uniformarray.everything.frag.out
Jeremy Hayes 6d5b40f051 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.
2021-07-28 14:55:45 -06:00

77 lines
3.5 KiB
Plaintext

remap.uniformarray.everything.frag
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 25030
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 5663 "main" 3608 4957 4339 5139
ExecutionMode 5663 OriginUpperLeft
Decorate 3608 Location 1
Decorate 4957 Location 0
Decorate 4339 Location 7
Decorate 5139 Location 0
8: TypeVoid
1282: TypeFunction 8
13: TypeFloat 32
29: TypeVector 13(float) 4
666: TypePointer Function 29(fvec4)
11: TypeInt 32 0
2588: 11(int) Constant 6
740: TypeArray 29(fvec4) 2588
1377: TypePointer Input 740
3608: 1377(ptr) Variable Input
12: TypeInt 32 1
2574: 12(int) Constant 1
667: TypePointer Input 29(fvec4)
24: TypeVector 13(float) 3
661: TypePointer Input 24(fvec3)
4957: 661(ptr) Variable Input
2570: 11(int) Constant 0
650: TypePointer Function 13(float)
2573: 11(int) Constant 1
2576: 11(int) Constant 2
2618: 11(int) Constant 16
709: TypeArray 13(float) 2618
1346: TypePointer Input 709
4339: 1346(ptr) Variable Input
2607: 12(int) Constant 12
651: TypePointer Input 13(float)
2579: 11(int) Constant 3
668: TypePointer Output 29(fvec4)
5139: 668(ptr) Variable Output
5663: 8 Function None 1282
25029: Label
4902: 666(ptr) Variable Function
10645: 667(ptr) AccessChain 3608 2574
8181: 29(fvec4) Load 10645
21370: 667(ptr) AccessChain 3608 2574
11355: 29(fvec4) Load 21370
23084: 29(fvec4) FAdd 8181 11355
Store 4902 23084
21218: 24(fvec3) Load 4957
13695: 29(fvec4) Load 4902
23959: 24(fvec3) VectorShuffle 13695 13695 0 1 2
14937: 24(fvec3) FAdd 23959 21218
15653: 650(ptr) AccessChain 4902 2570
21354: 13(float) CompositeExtract 14937 0
Store 15653 21354
16378: 650(ptr) AccessChain 4902 2573
15746: 13(float) CompositeExtract 14937 1
Store 16378 15746
16379: 650(ptr) AccessChain 4902 2576
15747: 13(float) CompositeExtract 14937 2
Store 16379 15747
19895: 651(ptr) AccessChain 4339 2607
7372: 13(float) Load 19895
21371: 650(ptr) AccessChain 4902 2579
11412: 13(float) Load 21371
22584: 13(float) FAdd 11412 7372
17318: 650(ptr) AccessChain 4902 2579
Store 17318 22584
17934: 29(fvec4) Load 4902
Store 5139 17934
Return
FunctionEnd