benchmarking fix.

Before this fix : it can be add more than one FinishTask in queue and send more than once FenceSignal
This commit is contained in:
ExMix 2013-03-25 11:23:17 +03:00 committed by Alex Zolotarev
parent e6a0d7976d
commit 0e45ef3c01

View file

@ -292,7 +292,13 @@ void CoverageGenerator::AddFinishSequenceTaskIfNeeded()
return;
if (m_benchmarkBarrier.m_tilesCount == 0)
{
// this instruction based on idea that up to this point all tiles is rendered, all threads
// expect gui thread in wait state, and no one can modify m_tilesCount expect gui thread.
// If banchmarking engine change logic, may be m_tilesCount need to be guard by some sync primitive
m_benchmarkBarrier.m_tilesCount = -1;
m_queue.AddCommand(bind(&CoverageGenerator::FinishSequence, this));
}
}
void CoverageGenerator::FinishSequence()