Optimize physics simulation with higher limit of 8 threads
This commit is contained in:
@@ -1794,7 +1794,7 @@ void* PhysicsBackend::CreateScene(const PhysicsSettings& settings)
|
|||||||
{
|
{
|
||||||
if (CpuDispatcher == nullptr)
|
if (CpuDispatcher == nullptr)
|
||||||
{
|
{
|
||||||
uint32 threads = Math::Clamp<uint32>(Platform::GetCPUInfo().ProcessorCoreCount - 1, 1, 4);
|
uint32 threads = Math::Clamp<uint32>(Platform::GetCPUInfo().ProcessorCoreCount - 1, 1, 8);
|
||||||
CpuDispatcher = PxDefaultCpuDispatcherCreate(threads);
|
CpuDispatcher = PxDefaultCpuDispatcherCreate(threads);
|
||||||
CHECK_INIT(CpuDispatcher, "PxDefaultCpuDispatcherCreate failed!");
|
CHECK_INIT(CpuDispatcher, "PxDefaultCpuDispatcherCreate failed!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user