1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[dxvk] Use all but two available threads for async pipeline compilation

This commit is contained in:
Philip Rebohle 2018-09-10 17:03:11 +02:00
parent 6532302e34
commit 5cc2c219dd
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -4,10 +4,12 @@
namespace dxvk {
DxvkPipelineCompiler::DxvkPipelineCompiler() {
constexpr uint32_t threadCount = 1u;
uint32_t sysCpuCount = dxvk::thread::hardware_concurrency();
uint32_t threadCount = sysCpuCount > 2 ? sysCpuCount - 2 : 1;
Logger::debug(str::format(
"DxvkPipelineCompiler: Using ", threadCount, " workers"));
Logger::info(str::format(
"DxvkPipelineCompiler: Using ",
threadCount, " workers"));
// Start the compiler threads
m_compilerThreads.resize(threadCount);