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
|
|
@ -18,6 +18,7 @@ layout (binding = 6) nonprivate uniform sampler2D samp[2];
|
|||
layout (binding = 7) nonprivate uniform BufferK { uint x; } bufferk;
|
||||
shared uint64_t atomu64;
|
||||
shared int64_t atomi64;
|
||||
layout (binding = 8) volatile buffer BufferL { uint x; } bufferl;
|
||||
|
||||
|
||||
void main()
|
||||
|
|
@ -57,5 +58,7 @@ void main()
|
|||
|
||||
atomu64 = atomicMax(atomu64, uint64_t(7), gl_ScopeDevice, 0, 0);
|
||||
atomicCompSwap(atomi64, int64_t(10), int64_t(atomu64), gl_ScopeDevice, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire, gl_StorageSemanticsBuffer | gl_StorageSemanticsShared, gl_SemanticsAcquire);
|
||||
|
||||
y = bufferl.x;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue