aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples/SampleBase/utils/JobManager.cpp
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2017-10-20 14:30:56 +0200
committerMarijn Tamis <[email protected]>2017-10-20 14:36:12 +0200
commitfabb251458f4a2d6d4f87dd36038fac2774b378c (patch)
tree68a4a0ecd940dc949e0477d521d8c159968cfcd5 /NvCloth/samples/SampleBase/utils/JobManager.cpp
parentNvCloth 1.1.2 Release. (22576033) (diff)
downloadnvcloth-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.cpp5
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