Clarifying Fence Behavior in Metal 4

I have some clarifying questions on how fences work in Metal 4.

  1. If two encoders A, B update the same fence and encoder C waits on that fence, is the work encoded by C guaranteed to execute after both A and B have completed, or after either A or B have completed? The following quotes in the waitForFence() documentation seem contradictory.
  • "Encodes a command that instructs the GPU to pause before starting one or more stages of the pass until a pass updates a fence."
  • "When encoding a pass that reuses a fence, wait for other passes to update the fence before repurposing that fence..."
  1. Are fences unsignaled when they are waited on? Specifically, can two (or more) encoders wait on a fence that is only updated in a single prior encoder?
  2. If an encoder updates a fence, no subsequent encoders in the command queue wait on the fence, and the command queue is committed, is that fence still signaled when used in a subsequent command buffer?
Clarifying Fence Behavior in Metal 4
 
 
Q