Tree benchmarks (#1)

Handle arena overflow
Align hull and mesh data
This commit is contained in:
Erin Catto 2026-05-10 23:50:16 -07:00 • committed by GitHub
commit d7816a0a58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 487 additions and 451 deletions

View file

@ -292,12 +292,14 @@ void Sample::CreateWorld( b3Capacity* capacity )
b3WorldDef worldDef = b3DefaultWorldDef();
worldDef.workerCount = m_context->workerCount;
worldDef.userTaskContext = this;
worldDef.enableSleep = m_context->enableSleep;
worldDef.createDebugShape = CreateDebugShape;
worldDef.destroyDebugShape = DestroyDebugShape;
worldDef.userDebugShapeContext = m_context;
worldDef.capacity = *capacity;
if (capacity != nullptr)
{
worldDef.capacity = *capacity;
}
m_worldId = b3CreateWorld( &worldDef );
b3World_SetContactRecycleDistance( m_worldId, m_context->recycleDistance );
@ -718,6 +720,7 @@ void Sample::UpdateUI()
ImGui::Text( "tree height static/movable = %d/%d", s.staticTreeHeight, s.treeHeight );
ImGui::Text( "sat call/hit = %d/%d", s.satCallCount, s.satCacheHitCount );
ImGui::Text( "stack allocator size = %d K", s.stackUsed / 1024 );
ImGui::Text( "arena capacity = %d K", s.arenaCapacity / 1024 );
ImGui::Text( "total allocation = %d K", s.byteCount / 1024 );
ImGui::Separator();
@ -1052,7 +1055,7 @@ void SampleManager::Startup( GLFWwindow* window, int width, int height, int buff
// todo_erin testing
// m_context.settings.workerCount = 1;
m_context.arena.Create( 100 * 1024 * 1024 );
m_context.arena.Create( 400 * 1024 * 1024 );
m_context.window = window;
m_context.camera.Resize( width, height );