Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:
- main
pull_request:

# Pin: 0.939.0, the latest release, and aeb v0.347, the one ae3d builds
# beside. 0.939.0 is a tracking bump again, no source change (it removes
# std.http.client's process-wide pool; nothing here makes HTTP requests);
# 0.938.0 was a tracking bump (aether#3821's discarded
# Pin: 0.940.0, the latest release, and aeb v0.347, the one ae3d builds
# beside. 0.940.0 brings lane min/max as minps/maxps (aether#3815) and
# --param relation-block-limit=0 on every GCC compile (aether#3848),
# neither changing a bit of ours. 0.939.0 was a tracking bump, no source
# change (it removes std.http.client's process-wide pool; nothing here
# makes HTTP requests); 0.938.0 was a tracking bump (aether#3821's discarded
# slice-returning calls clean under clang -Wunused-value, #3818's
# correctly rounded float parsing on mingw-w64). 0.937.0 brought returned views tracked by their mark
# (aether#3787) and the GCC inlining budget on optimising builds
Expand All @@ -27,7 +29,7 @@ on:
# bootstrap version: the floor this code needs, verified by every job
# below.
env:
AE_PIN: 0.939.0
AE_PIN: 0.940.0
AEB_REF: v0.347

jobs:
Expand Down
20 changes: 20 additions & 0 deletions bench/physics_world_box3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

static double now_ms( void )
Expand Down Expand Up @@ -103,8 +104,27 @@ static void print_profile( const char* name, stage_sum sum, int steps )
sum.integratePositions / n, sum.relax / n, sum.restitution / n, sum.store / n, sum.transforms / n, sum.refit / n, sum.other / n );
}

// AEPHYSICS_BENCH_SCENE=pyramid|pyramids|grid runs that scene alone, as
// bench/physics_world.ae reads it, so a profile samples one scene.
static int wanted( const char* name )
{
const char* asked = getenv( "AEPHYSICS_BENCH_SCENE" );
if ( asked == NULL || asked[0] == 0 )
{
return 1;
}
const char* key = strcmp( name, "large pyramid" ) == 0 ? "pyramid" : strcmp( name, "many pyramids" ) == 0 ? "pyramids" : "grid";
return strcmp( asked, key ) == 0;
}

static void run( const char* name, b3WorldId worldId, int steps )
{
if ( wanted( name ) == 0 )
{
b3DestroyWorld( worldId );
g_idCount = 0;
return;
}
// Gather the body ids through the move events after one zero step would miss sleeping ones; walk our own list instead.
stage_sum sum = { 0 };
double t0 = now_ms();
Expand Down
Loading