Skip to content

Test explicit synchronization with MTLFence in Metal backend #58

@K0bin

Description

@K0bin

Once there's actually something interesting to do for the GPU, experiment with implementing barriers like this:

There's two sets of MTLFences for each stage. Once for all signaled passes and one that all passes need to wait for.
Each set has a list of MTLFences for each stage thats relevant to Metal (compute, blit, fragment, mesh, vertex). Every pass adds a fence to the relevant list of the signaled set. When there's a pipeline barrier the signaled fences get moved over to the wait set (depending on the src & dst stages).

There's also a per-queue set of MTLFences. At the beginning of every command buffer those get added to the wait set and at the end there's an empty compute pass that just waits for all fences in the wait set and signals the per-queue ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions