diff --git a/src/ShaderCache.h b/src/ShaderCache.h index e8cebfe91..4aee03df2 100644 --- a/src/ShaderCache.h +++ b/src/ShaderCache.h @@ -351,7 +351,7 @@ namespace SIE void InsertModifiedShaderMap(std::string a_shader, std::chrono::time_point a_time); std::chrono::time_point GetModifiedShaderMapTime(const std::string& a_shader); - int32_t compilationThreadCount = std::max(static_cast(std::thread::hardware_concurrency()) - 1, 1); + int32_t compilationThreadCount = std::max({ static_cast(std::thread::hardware_concurrency()) - 4, static_cast(std::thread::hardware_concurrency()) * 3 / 4, 1 }); int32_t backgroundCompilationThreadCount = std::max(static_cast(std::thread::hardware_concurrency()) / 2, 1); BS::thread_pool compilationPool{}; bool backgroundCompilation = false;