WaitOnAsyncGraphicsFence
Instructs the GPU to pause processing of the queue until it passes through the GraphicsFence fence.
Read time 3 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
WaitOnAsyncGraphicsFence(GraphicsFence)
Instructs the GPU to pause processing of the queue until it passes through the GraphicsFence fence.
public void WaitOnAsyncGraphicsFence(GraphicsFence fence)
Parameters
The GraphicsFence the GPU waits for. The of the graphics fence must be GraphicsFenceType.AsyncQueueSynchronisation.
fenceTypeRemarks
This method returns immediately on the CPU. Only GPU processing is affected by the graphics fence.
You can use the parameter to wait until the start of the next item's vertex or pixel processing. On some platforms, there's a gap between the end of vertex processing and the start of pixel processing in a draw call. If the last command was a compute shader dispatch, Unity ignores .
stagestageThis method only works on platforms that support fences. Use SystemInfo.supportsGraphicsFence to check if a platform supports fences.
It's possible to create circular dependencies with this function that deadlock the GPU. See GraphicsFence for more information.
Additional Resources: GraphicsFence, CommandBuffer.CreateGraphicsFence.
WaitOnAsyncGraphicsFence(GraphicsFence, SynchronisationStage)
Instructs the GPU to pause processing of the queue until it passes through the GraphicsFence fence.
public void WaitOnAsyncGraphicsFence(GraphicsFence fence, SynchronisationStage stage)
Parameters
The GraphicsFence the GPU waits for. The of the graphics fence must be GraphicsFenceType.AsyncQueueSynchronisation.
fenceTypeWhich SynchronisationStage to wait for.
Remarks
This method returns immediately on the CPU. Only GPU processing is affected by the graphics fence.
You can use the parameter to wait until the start of the next item's vertex or pixel processing. On some platforms, there's a gap between the end of vertex processing and the start of pixel processing in a draw call. If the last command was a compute shader dispatch, Unity ignores .
stagestageThis method only works on platforms that support fences. Use SystemInfo.supportsGraphicsFence to check if a platform supports fences.
It's possible to create circular dependencies with this function that deadlock the GPU. See GraphicsFence for more information.
Additional Resources: GraphicsFence, CommandBuffer.CreateGraphicsFence.
WaitOnAsyncGraphicsFence(GraphicsFence, SynchronisationStageFlags)
Instructs the GPU to pause processing of the queue until it passes through the GraphicsFence fence.
public void WaitOnAsyncGraphicsFence(GraphicsFence fence, SynchronisationStageFlags stage)
Parameters
The GraphicsFence the GPU waits for. The of the graphics fence must be GraphicsFenceType.AsyncQueueSynchronisation.
fenceTypeWhich SynchronisationStage to wait for.
Remarks
This method returns immediately on the CPU. Only GPU processing is affected by the graphics fence.
You can use the parameter to wait until the start of the next item's vertex or pixel processing. On some platforms, there's a gap between the end of vertex processing and the start of pixel processing in a draw call. If the last command was a compute shader dispatch, Unity ignores .
stagestageThis method only works on platforms that support fences. Use SystemInfo.supportsGraphicsFence to check if a platform supports fences.
It's possible to create circular dependencies with this function that deadlock the GPU. See GraphicsFence for more information.
Additional Resources: GraphicsFence, CommandBuffer.CreateGraphicsFence.