Add a setting to wait for all navmesh jobs on exit

pull/3235/head
elsid 9 months ago
parent 50f4471750
commit 910c88325a
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -591,6 +591,12 @@ namespace MWWorld
// Must be cleared before mRendering is destroyed
if (mProjectileManager)
mProjectileManager->clear();
if (Settings::navigator().mWaitForAllJobsOnExit)
{
Log(Debug::Verbose) << "Waiting for all navmesh jobs to be done...";
mNavigator->wait(DetourNavigator::WaitConditionType::allJobsDone, nullptr);
}
}
void World::setRandomSeed(uint32_t seed)

@ -63,6 +63,7 @@ namespace Settings
SettingValue<bool> mEnableNavMeshDiskCache{ mIndex, "Navigator", "enable nav mesh disk cache" };
SettingValue<bool> mWriteToNavmeshdb{ mIndex, "Navigator", "write to navmeshdb" };
SettingValue<std::uint64_t> mMaxNavmeshdbFileSize{ mIndex, "Navigator", "max navmeshdb file size" };
SettingValue<bool> mWaitForAllJobsOnExit{ mIndex, "Navigator", "wait for all jobs on exit" };
};
}

@ -245,6 +245,16 @@ Absent pieces usually mean a bug in recast mesh tiles building.
Allows to do in-game debug.
Potentially decreases performance.
wait for all jobs on exit
-------------------------
:Type: boolean
:Range: True/False
:Default: False
Wait until all queued async navmesh jobs are processed before exiting the engine.
Useful when a benchmark generates jobs to write into navmeshdb faster than they are processed.
Expert settings
***************

@ -999,6 +999,9 @@ write to navmeshdb = true
# Approximate maximum file size of navigation mesh cache stored on disk in bytes (value > 0)
max navmeshdb file size = 2147483648
# Wait until all queued async navmesh jobs are processed before exiting the engine (true, false)
wait for all jobs on exit = false
[Shadows]
# Enable or disable shadows. Bear in mind that this will force OpenMW to use shaders as if "[Shaders]/force shaders" was set to true.

Loading…
Cancel
Save