Add support for AVX2 and runtime feature detection (#174)
- [x] run unit tests - [x] run all samples
This commit is contained in:
parent
51f056e0a9
commit
e77352cd60
53 changed files with 4681 additions and 3376 deletions
|
|
@ -245,6 +245,8 @@ b3WorldId b3CreateWorld( const b3WorldDef* def )
|
|||
|
||||
memset( world, 0, sizeof( b3World ) );
|
||||
|
||||
world->simdWidth = b3GetSIMDWidth();
|
||||
|
||||
world->worldId = (uint16_t)worldId;
|
||||
world->generation = revision;
|
||||
world->inUse = true;
|
||||
|
|
@ -2029,6 +2031,17 @@ bool b3World_IsWarmStartingEnabled( b3WorldId worldId )
|
|||
return world->enableWarmStarting;
|
||||
}
|
||||
|
||||
void b3World_EnableSSE2Fallback( b3WorldId worldId, bool flag )
|
||||
{
|
||||
b3World* world = b3GetUnlockedWorldFromId( worldId );
|
||||
if ( world == NULL )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
world->simdWidth = flag ? 4 : b3GetSIMDWidth();
|
||||
}
|
||||
|
||||
int b3World_GetAwakeBodyCount( b3WorldId worldId )
|
||||
{
|
||||
b3World* world = b3GetUnlockedWorldFromId( worldId );
|
||||
|
|
|
|||
Loading…
Reference in a new issue