mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 10:24:10 +01:00
[dxvk] Tweak number of pipeline compiler threads
Gives some 6-core and 8-core CPUs a bit more breathing room, while also supporting up to 32 workers instead of just 16 to leverage the new high core count Ryzen CPUs.
This commit is contained in:
parent
47555f1dda
commit
cd00719122
@ -154,12 +154,10 @@ namespace dxvk {
|
||||
|
||||
// Use half the available CPU cores for pipeline compilation
|
||||
uint32_t numCpuCores = dxvk::thread::hardware_concurrency();
|
||||
uint32_t numWorkers = numCpuCores > 8
|
||||
? numCpuCores * 3 / 4
|
||||
: numCpuCores * 1 / 2;
|
||||
uint32_t numWorkers = ((std::max(1u, numCpuCores) - 1) * 5) / 7;
|
||||
|
||||
if (numWorkers < 1) numWorkers = 1;
|
||||
if (numWorkers > 16) numWorkers = 16;
|
||||
if (numWorkers > 32) numWorkers = 32;
|
||||
|
||||
if (device->config().numCompilerThreads > 0)
|
||||
numWorkers = device->config().numCompilerThreads;
|
||||
|
Loading…
Reference in New Issue
Block a user