diff --git a/examples/ToyPathTracer/Source/Test.cpp b/examples/ToyPathTracer/Source/Test.cpp index dadb2060..910e009c 100644 --- a/examples/ToyPathTracer/Source/Test.cpp +++ b/examples/ToyPathTracer/Source/Test.cpp @@ -4,6 +4,7 @@ #include #if CPU_CAN_DO_THREADS #include "enkiTS/TaskScheduler_c.h" +#include #endif #include @@ -242,7 +243,7 @@ void InitializeTest() ZoneScoped; #if CPU_CAN_DO_THREADS g_TS = enkiNewTaskScheduler(); - enkiInitTaskScheduler(g_TS); + enkiInitTaskSchedulerNumThreads(g_TS, std::max( 2, std::thread::hardware_concurrency() - 2)); #endif }