Fix interactions between 'volatile' and the Vulkan memory model
Last year we changed 'volatile' to also act as 'coherent', but when I resolved the memory model changes against that change I missed handling volatile in a couple places that we check for coherent. There was also a place in post-processing that acted as if the volatile memory access flag has a literal number associated with it, when it doesn't.
This commit is contained in:
parent
9390154c55
commit
38cbad15ca
6 changed files with 38 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
spv.memoryScopeSemantics.comp
|
||||
// Module Version 10300
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 143
|
||||
// Id's are bound by 148
|
||||
|
||||
Capability Shader
|
||||
Capability Int64
|
||||
|
|
@ -43,6 +43,9 @@ spv.memoryScopeSemantics.comp
|
|||
Name 122 "samp"
|
||||
Name 133 "atomu64"
|
||||
Name 138 "atomi64"
|
||||
Name 143 "BufferL"
|
||||
MemberName 143(BufferL) 0 "x"
|
||||
Name 145 "bufferl"
|
||||
Decorate 36(imagei) DescriptorSet 0
|
||||
Decorate 36(imagei) Binding 1
|
||||
Decorate 45(imageu) DescriptorSet 0
|
||||
|
|
@ -69,6 +72,10 @@ spv.memoryScopeSemantics.comp
|
|||
Decorate 110(imagej) Binding 5
|
||||
Decorate 122(samp) DescriptorSet 0
|
||||
Decorate 122(samp) Binding 6
|
||||
MemberDecorate 143(BufferL) 0 Offset 0
|
||||
Decorate 143(BufferL) Block
|
||||
Decorate 145(bufferl) DescriptorSet 0
|
||||
Decorate 145(bufferl) Binding 8
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
|
@ -152,6 +159,9 @@ spv.memoryScopeSemantics.comp
|
|||
137: TypePointer Workgroup 136(int64_t)
|
||||
138(atomi64): 137(ptr) Variable Workgroup
|
||||
139:136(int64_t) Constant 10 0
|
||||
143(BufferL): TypeStruct 15(int)
|
||||
144: TypePointer StorageBuffer 143(BufferL)
|
||||
145(bufferl): 144(ptr) Variable StorageBuffer
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(origi): 7(ptr) Variable Function
|
||||
|
|
@ -204,18 +214,18 @@ spv.memoryScopeSemantics.comp
|
|||
81: 15(int) Load 80 MakePointerVisibleKHR NonPrivatePointerKHR 16
|
||||
Store 72(y) 81
|
||||
88: 68(ptr) AccessChain 87(bufferj) 38 38 38 12
|
||||
89: 15(int) Load 88 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 46
|
||||
89: 15(int) Load 88 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16
|
||||
Store 72(y) 89
|
||||
90: 15(int) Load 72(y)
|
||||
91: 68(ptr) AccessChain 79(bufferi) 38
|
||||
Store 91 90 MakePointerAvailableKHR NonPrivatePointerKHR 16
|
||||
92: 15(int) Load 72(y)
|
||||
93: 68(ptr) AccessChain 87(bufferj) 38 38 38 12
|
||||
Store 93 92 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 46
|
||||
Store 93 92 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 16
|
||||
95: 94(ptr) AccessChain 87(bufferj) 12 38
|
||||
96: 83(A) Load 95 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 46
|
||||
96: 83(A) Load 95 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16
|
||||
97: 94(ptr) AccessChain 87(bufferj) 38 38
|
||||
Store 97 96 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 46
|
||||
Store 97 96 Volatile MakePointerAvailableKHR NonPrivatePointerKHR 16
|
||||
102: 101(ptr) AccessChain 100(bufferk) 38
|
||||
103: 15(int) Load 102 NonPrivatePointerKHR
|
||||
104: 68(ptr) AccessChain 79(bufferi) 38
|
||||
|
|
@ -236,5 +246,8 @@ spv.memoryScopeSemantics.comp
|
|||
140:131(int64_t) Load 133(atomu64) MakePointerVisibleKHR NonPrivatePointerKHR 26
|
||||
141:136(int64_t) Bitcast 140
|
||||
142:136(int64_t) AtomicCompareExchange 138(atomi64) 12 63 63 141 139
|
||||
146: 68(ptr) AccessChain 145(bufferl) 38
|
||||
147: 15(int) Load 146 Volatile MakePointerVisibleKHR NonPrivatePointerKHR 16
|
||||
Store 72(y) 147
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue