SPV: Change barrier emission to conform to Khronos decisions.
The memory model group agreed to these definitions for how to map GLSL barrier, memoryBarrier, etc. With HLSL following suit.
This commit is contained in:
parent
070aaeafcd
commit
8297936dd6
19 changed files with 600 additions and 520 deletions
|
|
@ -1,7 +1,7 @@
|
|||
spv.310.comp
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80002
|
||||
// Id's are bound by 69
|
||||
// Id's are bound by 71
|
||||
|
||||
Capability Shader
|
||||
Capability DeviceGroup
|
||||
|
|
@ -13,17 +13,17 @@ spv.310.comp
|
|||
Source ESSL 310
|
||||
SourceExtension "GL_EXT_device_group"
|
||||
Name 4 "main"
|
||||
Name 13 "outb"
|
||||
MemberName 13(outb) 0 "f"
|
||||
MemberName 13(outb) 1 "g"
|
||||
MemberName 13(outb) 2 "h"
|
||||
MemberName 13(outb) 3 "uns"
|
||||
Name 15 "outbname"
|
||||
Name 19 "s"
|
||||
Name 24 "outbna"
|
||||
MemberName 24(outbna) 0 "k"
|
||||
MemberName 24(outbna) 1 "na"
|
||||
Name 26 "outbnamena"
|
||||
Name 12 "outb"
|
||||
MemberName 12(outb) 0 "f"
|
||||
MemberName 12(outb) 1 "g"
|
||||
MemberName 12(outb) 2 "h"
|
||||
MemberName 12(outb) 3 "uns"
|
||||
Name 14 "outbname"
|
||||
Name 18 "s"
|
||||
Name 23 "outbna"
|
||||
MemberName 23(outbna) 0 "k"
|
||||
MemberName 23(outbna) 1 "na"
|
||||
Name 25 "outbnamena"
|
||||
Name 42 "i"
|
||||
Name 48 "outs"
|
||||
MemberName 48(outs) 0 "s"
|
||||
|
|
@ -31,17 +31,17 @@ spv.310.comp
|
|||
Name 50 "outnames"
|
||||
Name 53 "gl_LocalInvocationID"
|
||||
Name 64 "gl_DeviceIndex"
|
||||
Decorate 12 ArrayStride 16
|
||||
MemberDecorate 13(outb) 0 Offset 0
|
||||
MemberDecorate 13(outb) 1 Offset 4
|
||||
MemberDecorate 13(outb) 2 Offset 8
|
||||
MemberDecorate 13(outb) 3 Offset 16
|
||||
Decorate 13(outb) BufferBlock
|
||||
Decorate 15(outbname) DescriptorSet 0
|
||||
MemberDecorate 24(outbna) 0 Offset 0
|
||||
MemberDecorate 24(outbna) 1 Offset 16
|
||||
Decorate 24(outbna) BufferBlock
|
||||
Decorate 26(outbnamena) DescriptorSet 0
|
||||
Decorate 11 ArrayStride 16
|
||||
MemberDecorate 12(outb) 0 Offset 0
|
||||
MemberDecorate 12(outb) 1 Offset 4
|
||||
MemberDecorate 12(outb) 2 Offset 8
|
||||
MemberDecorate 12(outb) 3 Offset 16
|
||||
Decorate 12(outb) BufferBlock
|
||||
Decorate 14(outbname) DescriptorSet 0
|
||||
MemberDecorate 23(outbna) 0 Offset 0
|
||||
MemberDecorate 23(outbna) 1 Offset 16
|
||||
Decorate 23(outbna) BufferBlock
|
||||
Decorate 25(outbnamena) DescriptorSet 0
|
||||
Decorate 47 ArrayStride 16
|
||||
MemberDecorate 48(outs) 0 Offset 0
|
||||
MemberDecorate 48(outs) 1 Offset 16
|
||||
|
|
@ -49,81 +49,85 @@ spv.310.comp
|
|||
Decorate 50(outnames) DescriptorSet 0
|
||||
Decorate 53(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 64(gl_DeviceIndex) BuiltIn DeviceIndex
|
||||
Decorate 68 BuiltIn WorkgroupSize
|
||||
Decorate 70 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: 6(int) Constant 2
|
||||
8: 6(int) Constant 1
|
||||
9: 6(int) Constant 0
|
||||
10: TypeFloat 32
|
||||
11: TypeVector 10(float) 3
|
||||
12: TypeRuntimeArray 11(fvec3)
|
||||
13(outb): TypeStruct 10(float) 10(float) 10(float) 12
|
||||
14: TypePointer Uniform 13(outb)
|
||||
15(outbname): 14(ptr) Variable Uniform
|
||||
16: TypeInt 32 1
|
||||
17: 16(int) Constant 0
|
||||
18: TypePointer Workgroup 10(float)
|
||||
19(s): 18(ptr) Variable Workgroup
|
||||
21: TypePointer Uniform 10(float)
|
||||
23: TypeVector 10(float) 4
|
||||
24(outbna): TypeStruct 16(int) 23(fvec4)
|
||||
25: TypePointer Uniform 24(outbna)
|
||||
26(outbnamena): 25(ptr) Variable Uniform
|
||||
27: 16(int) Constant 1
|
||||
30: TypePointer Uniform 23(fvec4)
|
||||
32: 16(int) Constant 3
|
||||
33: 16(int) Constant 18
|
||||
36: 16(int) Constant 17
|
||||
37: 10(float) Constant 1077936128
|
||||
38: 11(fvec3) ConstantComposite 37 37 37
|
||||
39: TypePointer Uniform 11(fvec3)
|
||||
41: TypePointer Workgroup 16(int)
|
||||
8: 6(int) Constant 264
|
||||
9: TypeFloat 32
|
||||
10: TypeVector 9(float) 3
|
||||
11: TypeRuntimeArray 10(fvec3)
|
||||
12(outb): TypeStruct 9(float) 9(float) 9(float) 11
|
||||
13: TypePointer Uniform 12(outb)
|
||||
14(outbname): 13(ptr) Variable Uniform
|
||||
15: TypeInt 32 1
|
||||
16: 15(int) Constant 0
|
||||
17: TypePointer Workgroup 9(float)
|
||||
18(s): 17(ptr) Variable Workgroup
|
||||
20: TypePointer Uniform 9(float)
|
||||
22: TypeVector 9(float) 4
|
||||
23(outbna): TypeStruct 15(int) 22(fvec4)
|
||||
24: TypePointer Uniform 23(outbna)
|
||||
25(outbnamena): 24(ptr) Variable Uniform
|
||||
26: 15(int) Constant 1
|
||||
29: TypePointer Uniform 22(fvec4)
|
||||
31: 15(int) Constant 3
|
||||
32: 15(int) Constant 18
|
||||
33: 6(int) Constant 0
|
||||
36: 15(int) Constant 17
|
||||
37: 9(float) Constant 1077936128
|
||||
38: 10(fvec3) ConstantComposite 37 37 37
|
||||
39: TypePointer Uniform 10(fvec3)
|
||||
41: TypePointer Workgroup 15(int)
|
||||
42(i): 41(ptr) Variable Workgroup
|
||||
47: TypeRuntimeArray 23(fvec4)
|
||||
48(outs): TypeStruct 16(int) 47
|
||||
47: TypeRuntimeArray 22(fvec4)
|
||||
48(outs): TypeStruct 15(int) 47
|
||||
49: TypePointer Uniform 48(outs)
|
||||
50(outnames): 49(ptr) Variable Uniform
|
||||
51: TypeVector 6(int) 3
|
||||
52: TypePointer Input 51(ivec3)
|
||||
53(gl_LocalInvocationID): 52(ptr) Variable Input
|
||||
54: TypePointer Input 6(int)
|
||||
61: TypePointer Uniform 16(int)
|
||||
63: TypePointer Input 16(int)
|
||||
61: TypePointer Uniform 15(int)
|
||||
63: TypePointer Input 15(int)
|
||||
64(gl_DeviceIndex): 63(ptr) Variable Input
|
||||
65: 6(int) Constant 16
|
||||
66: 6(int) Constant 32
|
||||
67: 6(int) Constant 4
|
||||
68: 51(ivec3) ConstantComposite 65 66 67
|
||||
65: 6(int) Constant 1
|
||||
66: 6(int) Constant 4040
|
||||
67: 6(int) Constant 16
|
||||
68: 6(int) Constant 32
|
||||
69: 6(int) Constant 4
|
||||
70: 51(ivec3) ConstantComposite 67 68 69
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
ControlBarrier 7 8 9
|
||||
20: 10(float) Load 19(s)
|
||||
22: 21(ptr) AccessChain 15(outbname) 17
|
||||
Store 22 20
|
||||
28: 10(float) Load 19(s)
|
||||
29: 23(fvec4) CompositeConstruct 28 28 28 28
|
||||
31: 30(ptr) AccessChain 26(outbnamena) 27
|
||||
Store 31 29
|
||||
34: 21(ptr) AccessChain 15(outbname) 32 33 9
|
||||
35: 10(float) Load 34
|
||||
Store 19(s) 35
|
||||
40: 39(ptr) AccessChain 15(outbname) 32 36
|
||||
ControlBarrier 7 7 8
|
||||
19: 9(float) Load 18(s)
|
||||
21: 20(ptr) AccessChain 14(outbname) 16
|
||||
Store 21 19
|
||||
27: 9(float) Load 18(s)
|
||||
28: 22(fvec4) CompositeConstruct 27 27 27 27
|
||||
30: 29(ptr) AccessChain 25(outbnamena) 26
|
||||
Store 30 28
|
||||
34: 20(ptr) AccessChain 14(outbname) 31 32 33
|
||||
35: 9(float) Load 34
|
||||
Store 18(s) 35
|
||||
40: 39(ptr) AccessChain 14(outbname) 31 36
|
||||
Store 40 38
|
||||
43: 16(int) Load 42(i)
|
||||
44: 10(float) Load 19(s)
|
||||
45: 11(fvec3) CompositeConstruct 44 44 44
|
||||
46: 39(ptr) AccessChain 15(outbname) 32 43
|
||||
43: 15(int) Load 42(i)
|
||||
44: 9(float) Load 18(s)
|
||||
45: 10(fvec3) CompositeConstruct 44 44 44
|
||||
46: 39(ptr) AccessChain 14(outbname) 31 43
|
||||
Store 46 45
|
||||
55: 54(ptr) AccessChain 53(gl_LocalInvocationID) 9
|
||||
55: 54(ptr) AccessChain 53(gl_LocalInvocationID) 33
|
||||
56: 6(int) Load 55
|
||||
57: 10(float) Load 19(s)
|
||||
58: 23(fvec4) CompositeConstruct 57 57 57 57
|
||||
59: 30(ptr) AccessChain 50(outnames) 27 56
|
||||
57: 9(float) Load 18(s)
|
||||
58: 22(fvec4) CompositeConstruct 57 57 57 57
|
||||
59: 29(ptr) AccessChain 50(outnames) 26 56
|
||||
Store 59 58
|
||||
60: 16(int) ArrayLength 15(outbname) 3
|
||||
62: 61(ptr) AccessChain 50(outnames) 17
|
||||
60: 15(int) ArrayLength 14(outbname) 3
|
||||
62: 61(ptr) AccessChain 50(outnames) 16
|
||||
Store 62 60
|
||||
MemoryBarrier 65 8
|
||||
MemoryBarrier 7 66
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue