Пример #1
0
 void GPUProgressTracking::waitUntilCompleted(SeqNum seqNum)
 {
     while (!hasCompleted(seqNum))
     {
         auto &executed = executedCommandLists;
         XOR_CHECK(!executed.empty(), "Nothing to wait for, deadlock!");
         executed.front().waitUntilCompleted();
     }
 }
Пример #2
0
	void AsyncOp::blockUntilComplete() const
	{
		if (mSyncData == nullptr)
		{
			LOGERR("No sync data is available. Cannot block until AsyncOp is complete.");
			return;
		}

		Lock lock(mSyncData->mMutex);
		while (!hasCompleted())
			mSyncData->mCondition.wait(lock);
	}
Пример #3
0
        bool GPUProgressTracking::hasBeenExecuted(SeqNum seqNum)
        {
            if (hasCompleted(seqNum))
                return true;

            if (seqNum > newestExecuted)
                return false;

            for (auto &c : executedCommandLists)
            {
                if (c.number() == seqNum)
                    return true;
            }

            return false;
        }