Skip to content

[Memory Model] Contradiction with vanilla spec regarding data race #2792

Description

@Karpov-Ruslan

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):

Image

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:

Image

Vanilla spec

Vanilla Spec states:

Image

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:

Image

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions