Memory Model
The Memory Model provides one of the definitions of location-ordered, which refers to synchronization using Vulkan API functions (for example, via vkCmdPipelineBarrier):
As you can see, if another write follows the write, then only the availability operation needs to be performed (I omit the memory domain operation).
The location-ordered relation is necessary to avoid data races:
Vanilla spec
Vanilla Spec states:
This means that a visibility operation must be used after an availability operation in the case of write-after-write.
If you don't use the correct memory dependencies, it will lead to a data race:
Question
The Memory Model and Vanilla Spec give slightly different instructions on how to avoid data races. What is true in this case?
P.S. Some other issues also highlight this contradiction, but since it still hasn't been resolved, I decided to open a new issue.
Memory Model
The Memory Model provides one of the definitions of location-ordered, which refers to synchronization using Vulkan API functions (for example, via
vkCmdPipelineBarrier):As you can see, if another write follows the write, then only the availability operation needs to be performed (I omit the memory domain operation).
The location-ordered relation is necessary to avoid data races:
Vanilla spec
Vanilla Spec states:
This means that a visibility operation must be used after an availability operation in the case of write-after-write.
If you don't use the correct memory dependencies, it will lead to a data race:
Question
The Memory Model and Vanilla Spec give slightly different instructions on how to avoid data races. What is true in this case?
P.S. Some other issues also highlight this contradiction, but since it still hasn't been resolved, I decided to open a new issue.