private bool WaitFreeCompleted(CommandBufferPool cbp) { if (_pendingCopies.TryPeek(out var pc)) { if (!pc.Fence.IsSignaled()) { if (cbp.IsFenceOnRentedCommandBuffer(pc.Fence)) { return(false); } pc.Fence.Wait(); } var dequeued = _pendingCopies.Dequeue(); Debug.Assert(dequeued.Fence == pc.Fence); _freeSize += pc.Size; pc.Fence.Put(); } return(true); }