diff options
| author | Marijn Tamis <[email protected]> | 2017-10-20 14:30:56 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2017-10-20 14:36:12 +0200 |
| commit | fabb251458f4a2d6d4f87dd36038fac2774b378c (patch) | |
| tree | 68a4a0ecd940dc949e0477d521d8c159968cfcd5 /NvCloth/samples/SampleBase/utils/JobManager.cpp | |
| parent | NvCloth 1.1.2 Release. (22576033) (diff) | |
| download | nvcloth-fabb251458f4a2d6d4f87dd36038fac2774b378c.tar.xz nvcloth-fabb251458f4a2d6d4f87dd36038fac2774b378c.zip | |
NvCloth 1.1.3 Release. (23014067)v1.1.3
Diffstat (limited to 'NvCloth/samples/SampleBase/utils/JobManager.cpp')
| -rw-r--r-- | NvCloth/samples/SampleBase/utils/JobManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/NvCloth/samples/SampleBase/utils/JobManager.cpp b/NvCloth/samples/SampleBase/utils/JobManager.cpp index 093db60..2a18d1c 100644 --- a/NvCloth/samples/SampleBase/utils/JobManager.cpp +++ b/NvCloth/samples/SampleBase/utils/JobManager.cpp @@ -124,13 +124,16 @@ void MultithreadedSolverHelper::StartSimulation(float dt) for (int j = 0; j < mSolver->getSimulationChunkCount(); j++) mSimulationChunkJobs[j].Reset(); } + mStartSimulationJob.Reset(); mEndSimulationJob.Reset(mSolver->getSimulationChunkCount()); mStartSimulationJob.RemoveReference(); - } void MultithreadedSolverHelper::WaitForSimulation() { + if (mSolver->getSimulationChunkCount() == 0) + return; + mEndSimulationJob.Wait(); }
\ No newline at end of file |