Skip to content

Clarification regarding validity of concurrent host-device access of mapped memory #2641

@physics-enthusiast

Description

@physics-enthusiast

The documentation for vkMapMemory states that

vkMapMemory does not check whether the device memory is currently in use before returning the host-accessible pointer. The application must guarantee that any previously submitted command that writes to this range has completed before the host reads from or writes to that range, and that any previously submitted command that reads from that range has completed before the host writes to that region

Does the "previously" in "previously submitted command" mean "before the call to vkMapMemory" or "before any read/write"?
i.e. Is concurrent host-device access to a mapped memory range considered to be undefined behaviour, or merely "externally synchronized" (valid but with no guarantees on visibility/availability)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions