MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / flushUpdates

Method flushUpdates

physx/source/scenequery/src/SqSceneQueryManager.cpp:432–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432void SceneQueryManager::flushUpdates()
433{
434 PX_PROFILE_ZONE("SceneQuery.flushUpdates", mScene.getContextId());
435
436 if (mPrunerNeedsUpdating)
437 {
438 // no need to take lock if manual sq update is enabled
439 // as flushUpdates will only be called from NpScene::flushQueryUpdates()
440 mSceneQueryLock.lock();
441
442 if (mPrunerNeedsUpdating)
443 {
444
445 flushShapes();
446
447 for (PxU32 i = 0; i < PruningIndex::eCOUNT; i++)
448 if (mPrunerExt[i].pruner())
449 mPrunerExt[i].pruner()->commit();
450
451 Ps::memoryBarrier();
452 mPrunerNeedsUpdating = false;
453 }
454 mSceneQueryLock.unlock();
455 }
456}
457
458void SceneQueryManager::forceDynamicTreeRebuild(bool rebuildStaticStructure, bool rebuildDynamicStructure)
459{

Callers 4

multiQueryMethod · 0.80
flushQueryUpdatesMethod · 0.80
sceneQueriesUpdateMethod · 0.80
fetchQueriesMethod · 0.80

Calls 6

memoryBarrierFunction · 0.50
getContextIdMethod · 0.45
lockMethod · 0.45
prunerMethod · 0.45
commitMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected