예제 #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;
        }