public GraphicsFence CreateGraphicsFence(GraphicsFenceType fenceType, SynchronisationStageFlags stage) { GraphicsFence newFence = new GraphicsFence(); newFence.m_Ptr = CreateGPUFence_Internal(fenceType, stage); newFence.InitPostAllocation(); newFence.Validate(); return(newFence); }
public void WaitOnAsyncGraphicsFence(GraphicsFence fence, SynchronisationStageFlags stage) { if (fence.m_FenceType != GraphicsFenceType.AsyncQueueSynchronisation) { throw new ArgumentException("Attempting to call WaitOnAsyncGPUFence on a fence that is not of GraphicsFenceType.AsyncQueueSynchronization"); } fence.Validate(); //Don't wait on a fence that's already known to have passed if (fence.IsFencePending()) { WaitOnGPUFence_Internal(fence.m_Ptr, stage); } }